我正在使用
Set Fcell = tmpSheet.Range("A2:A" & lastrow).Find(What:="To find Value")
现在我想在同一个单元格中搜索“查找值”或“查找单词”。 怎么做?
答案 0 :(得分:2)
试试这个:
Set Fcell = tmpSheet.Range("A2:A" & lastrow).Find(What:="To find Value")
If Fcell Is Nothing Then
Set Fcell = tmpSheet.Range("A2:A" & lastrow).Find(What:="To find word")
End If
If Not Fcell Is Nothing Then
' found, set the value
Else
' not found :(
End If