tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,832
- Office Version
- 365
- 2019
- Platform
- Windows
Following from my earlier post:
the code to find a value on another sheet is as follows:
but I noticed this found the value, "somevalue".
If I want to fine variants of it, eg "somevalue1", "somevalue2", etc. I think I would need to add a wildcard like so:
but what if I only want to find the EXACT value of "somevalue*" (and not its variants)?
Code:
https://www.mrexcel.com/board/threads/find-value-not-on-activesheet.1156291/#post-5606422
the code to find a value on another sheet is as follows:
Code:
Dim abc
abc = Sheet1.Cells.Find(What:="somevalue", _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)
but I noticed this found the value, "somevalue".
If I want to fine variants of it, eg "somevalue1", "somevalue2", etc. I think I would need to add a wildcard like so:
Code:
Dim abc
abc = Sheet1.Cells.Find(What:="somevalue*", _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)
but what if I only want to find the EXACT value of "somevalue*" (and not its variants)?