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":
Training Video on how to use FIND in VBA: