跳到主要内容

在Excel中轻松找到字符在字符串中第n次出现的位置

Kutools for Excel

提升 Excel 300+
强大的功能

通常,您可以使用公式或VBA代码查找并返回文本字符串中某个字符的第n次出现位置。 但是实际上,您可以使用方便的工具解决此问题,并节省更多的日常工作时间。 的 查找字符在字符串中第N个出现的位置 实用程序 Kutools for Excel 可以帮助您轻松解决此问题,而无需任何公式或复杂的VBA代码。

轻松找到文本字符串中第n个出现的字符的位置


轻松找到文本字符串中第n个出现的字符的位置

假设您需要从单元格A3中的文本字符串中找到字符“ n”的第1次出现的位置(如下面的屏幕快照所示),请执行以下操作。

1.请选择一个空白单元格以使用该公式,然后单击 库工具 > 公式助手 > 公式助手。 看截图:

2.在 公式助手 对话框,请执行以下操作:

  • 选择一个公式 框,找到并选择 查找字符在字符串中第N个出现的位置;
    Tips:您可以检查 筛选器 框,在文本框中输入特定单词以快速过滤公式。
  • 框中,指定要查找第n个字符位置的带有文本字符串的单元格。
  • 将您需要查找的字符输入到 字符 框。
  • 将第n次出现的字符输入到 第N次发生 框。
  • 点击 OK 按钮。

:

1.例如,尝试确定字符“ n”在第三次出现中的位置,请在第N次出现框中键入数字3。 如果要查找第四个出现的“ n”,请键入数字4。

现在,在所选单元格中填充了第三个字符“ n”的位置。 看截图:

2.如果你喜欢这样 公式助手,您可以点击 Share 图标 ,在 公式助手 对话框以通过电子邮件与您的朋友分享,或分享到社交媒体,例如Facebook,Twitter,Linkedin和微博。


演示:轻松查找文本字符串中第n个字符出现的位置

Kutools for Excel:拥有 300 多个方便的 Excel 插件,30 天内免费试用,无限制。 立即下载并免费试用!


生产力工具推荐
以下工具可以极大地节省您的时间和金钱,哪一种适合您?
Office Tab: 在办公室中使用方便的选项卡,作为Chrome,Firefox和New Internet Explorer的方式。
Kutools for Excel: 超过300种Excel高级功能 2021、2019、2016、2013、2010、2007 和 Office 365。

Kutools for Excel

上述功能只是 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