VBA 的 Find 函数是用来在指定的范围内查找某个值的。使用方法如下:
Dim rng As Range Set rng = Cells.Find(What:="要查找的值", After:=ActiveCell, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True, SearchFormat:=False)
如果找到了,则返回一个 Range 对象;如果没有找到,则返回 Nothing。