我必须在 Excel 表中找到一个值celda。我正在使用这个 vba 代码来找到它:
Set cell = Cells.Find(What:=celda, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False)
If cell Is Nothing Then
'do it something
Else
'do it another thing
End If
问题是当我必须仅在 excel 列中找到值时。我用下一个代码找到它:
Columns("B:B").Select
Selection.Find(What:="VA22GU1", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
但我不知道如何使其适应第一个 vba 代码,因为我必须使用 value nothing
。