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
- 1061 reads

Recent comments
1 day 54 min ago
1 day 7 hours ago
1 day 12 hours ago
1 day 20 hours ago
1 day 20 hours ago
1 day 20 hours ago
1 day 21 hours ago
1 day 22 hours ago
4 days 6 hours ago
5 days 19 hours ago