vba wildcard search on cell

后端 未结 1 1455
耶瑟儿~
耶瑟儿~ 2021-01-15 12:38

I\'m trying to find something with a wild card search in a cell value. If the value in sheet(\"FC\")Range(\"I2:I\" & LastRowC) - match with the Sheets(\"Instr\"),Range(

相关标签:
1条回答
  • 2021-01-15 13:08

    You could use the Like operator. For example:

    If fcphc.Value Like "*" & icel.Value & "*" Then
    

    If you wanted the comparison to work both ways:

    If _
        fcphc.Value Like "*" & icel.Value & "*" Or _
        icel.Value Like "*" & fcphc.Value & "*" _
    Then
    
    0 讨论(0)
提交回复
热议问题