vbscript 在X后的单元格中查找字符串

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 在X后的单元格中查找字符串相关的知识,希望对你有一定的参考价值。

'*******************************************************************************************************************************
'FindCellWithString
' Given a column,  a String to search for, and an anchor point, returns the first Range where that string is held after the anchor
Public Function FindRangeWithString(sSearchTerm As String, sAfterRange As String, wsSheet As Worksheet) As Range
    On Error GoTo 0
    Set FindRangeWithString = wsSheet.Cells.Find(What:=sSearchTerm, After:=wsSheet.Range(sAfterRange), SearchDirection:=xlNext)
End Function

以上是关于vbscript 在X后的单元格中查找字符串的主要内容,如果未能解决你的问题,请参考以下文章