Excel中查找字符第N次出现的位置
1、在Excel中按下ALT+F11,打开VBA编辑器

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
