How to use XMATCH with Application.WorksheetFunction in Excel VBA? Today, a question from Hydrogen Peroxide. How can you refer to an array inside of a formula in Excel VBA.
This workbook takes a look at how to simulate an Excel function in VBA.
We start off with a simple one, just as MID which is already built in to VBA.
Then, for a function like VLOOKUP that is not in Excel VBA, you can use Application.WorksheetFunction.
However, today's question needs to concatenate two ranges and then pass that to Application.WorksheetFunction and this does not work.
The solution, thanks to Brad Yundt, is to do the concatenation inside of Application.Evaluate.
Check out Brad Yundt's answers on Quora: Brad Yundt