跳到主要內容

在Excel中輕鬆找到字符在字符串中第n次出現的位置

Excel的Kutools

提升 Excel 300+
強大的功能

通常,您可以使用公式或VBA代碼查找並返回文本字符串中某個字符的第n次出現位置。 但是實際上,您可以使用方便的工具解決此問題,並節省更多的日常工作時間。 的 查找字符在字符串中第N個出現的位置 的效用 Excel的Kutools 可以幫助您輕鬆解決此問題,而無需任何公式或複雜的VBA代碼。

輕鬆找到文本字符串中第n個出現的字符的位置


輕鬆找到文本字符串中第n個出現的字符的位置

假設您需要從單元格A3中的文本字符串中找到字符“ n”的第1次出現的位置(如下面的屏幕快照所示),請執行以下操作。

1.請選擇一個空白單元格以使用該公式,然後單擊 庫工具 > 公式助手 > 公式助手。 看截圖:

2。 在裡面 公式助手 對話框,請執行以下操作:

  • 選擇一個公式 框,找到並選擇 查找字符在字符串中第N個出現的位置;
    保養竅門:您可以檢查 篩選 框,在文本框中輸入特定單詞以快速過濾公式。
  • 框中,指定要查找第n個字符位置的帶有文本字符串的單元格。
  • 將您需要查找的字符輸入到 性格 框。
  • 將第n次出現的字符輸入到 第N次發生 框。
  • 點擊 OK 按鈕。

筆記:

1.例如,嘗試確定字符“ n”在第三次出現中的位置,請在第N次出現框中鍵入數字3。 如果要查找第四個出現的“ n”,請鍵入數字4。

現在,在所選單元格中填充了第三個字符“ n”的位置。 看截圖:

2.如果你喜歡這樣 公式助手,您可以點擊 分享到 圖標 ,在 公式助手 對話框以通過電子郵件與您的朋友分享,或分享到社交媒體,例如Facebook,Twitter,Linkedin和微博。


演示:輕鬆查找文本字符串中第n個字符出現的位置

Excel的Kutools:擁有 300 多個方便的 Excel 插件,30 天內免費試用,無限制。 立即下載並免費試用!


生產力工具推薦
以下工具可以極大地節省您的時間和金錢,哪一種適合您?
Office Tab: 在辦公室中使用方便的選項卡,作為Chrome,Firefox和New Internet Explorer的方式。
Excel的Kutools: 超過300種Excel高級功能 2021、2019、2016、2013、2010、2007 和 Office 365。

Excel的Kutools

上述功能只是Kutools for Excel的300個強大功能之一。

專為 Excel(Office) 2021、2019、2016、2013、2010、2007 和 Office 365 設計。免費下載和使用 30 天。

Kutools for Excel的屏幕截圖

btn了解更多      btn下載     btn購買

Comments (1)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Not helpful when I don't know the 'nth' count of the character; should be inherent that the formula finds the 'nth' number of the character and uses that in the formula, e.g., 'in <string> find <character> (and inherently count the total occurrences to know 'nth') and return <nth> instance position in string'; This would require formula to assume if field 'Nth occurrence' is left blank, it will use the 'Nth occurrence value' as the argument
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations