网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

Excel中查找字符第N次出现的位置

时间:2024-10-13 03:23:42

1、在Excel中按下ALT+F11,打开VBA编辑器

Excel中查找字符第N次出现的位置

3、'查询findStr在fullStr中第count次出现的位置Function getStrLoc(findStr As Stri荏鱿胫协ng, fullStr As String, count As Integer)Dim ct As Integer, i As Integerct = 0For i = 1 To count ct = VBA.inStr(ct + 1, fullStr, findStr, vbTextCompare)NextgetStrLoc = ctEnd Function

Excel中查找字符第N次出现的位置
© 阿力知识库