4. VBA Tips - Finding things using VBA

Don't use VLOOKUP, INDEX, or MATCH from VBA when finding things on a worksheet with VBA.
- The problem with these is that when the function doesn't find something, it will return a VBA error which you then have to trap and handle successfully.
- This is a very messy way of coding, and prone to errors.
The best way to look for things on a sheet is to use .Find
Here's an example that finds all whole instances of "Nick" on this sheet:
This code will find all instances of "Nick":
Download workbook with code on how to find all instances of a string on a worksheet
Training Video on how to use FIND in VBA:
»
- Nick's blog
- Add new comment
- 4271 reads

Recent comments
12 hours 16 min ago
19 hours 34 min ago
22 hours 27 min ago
22 hours 32 min ago
1 day 13 hours ago
1 day 13 hours ago
1 day 23 hours ago
2 days 15 hours ago
3 days 15 hours ago
3 days 15 hours ago