AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 2,058
- Office Version
- 2019
- 2010
- Platform
- Windows
What's the best way to Find all instances of *Fred* in a worksheet column ?
Tried recording a macro, highlit column and Control-F but it only showed the Select part.
Should I set a Range first? Then iterate through that?
You can't use something like:
"Select Column1, Column2 from Sheet1 Where Column2 Like '*Fred*'"
The Hits are destined to build into a listview control.
A Google search brought up a few things but wasn't obvious which to choose. And suggested things like VLOOKUP and MATCH which may be well off track.
I could just For i= 1 to NumberOfRows: If.... Next etc. but that doesn't seem the most efficient. Or is that just a good/quick as anything else?
Tried recording a macro, highlit column and Control-F but it only showed the Select part.
Should I set a Range first? Then iterate through that?
You can't use something like:
"Select Column1, Column2 from Sheet1 Where Column2 Like '*Fred*'"
The Hits are destined to build into a listview control.
A Google search brought up a few things but wasn't obvious which to choose. And suggested things like VLOOKUP and MATCH which may be well off track.
I could just For i= 1 to NumberOfRows: If.... Next etc. but that doesn't seem the most efficient. Or is that just a good/quick as anything else?