Forum Discussion
slbrick13
Nov 19, 2021Copper Contributor
XLookup Not Finding a Match (when I see that the data is there)
This is about XLookup not working for me. I'm using Microsoft 365 (Excel) in Windows 10 Enterprise I am using XLookup (for the first time) in VBA for an Excel Workbook that I am modifying for w...
mtarler
Nov 19, 2021Silver Contributor
I agree you are probably having a problem with 1 being a number and the other being text. try force formatting of both sets to be text in the code. OR better yet, dump the worksheet function and use VBA. you are already in VBA and I believe I've seen time tests showing that this type of search is much more efficiently done using a loop in VBA than to use a built in like that. Just loop through the array, check and exit when found.
- slbrick13Nov 19, 2021Copper ContributorThanks, so much, for the confirmation. I will try to do the loop using VBA. Great idea.