Sub Test2()
found = False
InfLastRow = Worksheets("Test").Range("A" & Rows.Count).End(xlUp).Row
TestItem = Worksheets("Test").Range("A3").Value
Set SearchRange = Worksheets("Test").Range("A2:K" & (InfLastRow))
Set c = SearchRange.Find(TestItem, , xlValues, xlWhole)
If c Is Nothing Then
MsgBox "沒有找到"
Else
MsgBox "有找到"
End If
End Sub作者: luhpro 時間: 2024-8-28 22:07