The problem with VLOOKUP
VLOOKUP only looks to the right, defaults to approximate match unless you add FALSE, and breaks when someone inserts a column, because the column number is hard-coded.
The XLOOKUP way
=XLOOKUP(A2, Products[Code], Products[Price], "Not found")
- Looks in any direction
- Exact match by default
- Built-in result when nothing is found
- Doesn't break when columns are inserted
When VLOOKUP still matters
XLOOKUP needs Excel 2021 or Microsoft 365. If your files are shared with people on older versions, they'll see errors. Check before you switch everything over.
Why Mike?
Training since 1990, around 70,000 people trained, and author of VBA Automation for Excel 2019 Cookbook (Packt, 2020). Based in Pretoria and travels countrywide.
Plan my team's training