excel提取字符串中某一字符位置

 

Public Function getPos(source As String, searchChar As String)
  Dim i
 i = InStr(1, source, searchChar, vbTextCompare) '调用vba函数 
 getPos = i
 End Function

posted on 2024-12-10 17:26  码农at突泉  阅读(2)  评论(0编辑  收藏  举报