开发者

How to make Selection.Find is locate an entire number instead of only the beginning of it?

I have the following problem: In my macro, I select a range and try to locate a number within this selection. The problem is that if the number I am searching is 16 and there is a 160 followed by a 16 in the list, it finds the 160. How do I solve this? Ideas?

Range("AC7:AK12").Select
Selection.Find(What:=numbe, After:=ActiveCell, LookIn:=xlValues, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    Ma开发者_如何学编程tchCase:=False, SearchFormat:=False).Activate


Try LookAt:=xlWhole:

Range("AC7:AK12").Select
Selection.Find(What:=numbe, After:=ActiveCell, LookIn:=xlValues, _
    LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Activate
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜