i have very recently started to learn to create VBA macros in Excel, however, I am completely stumped as to how to create a CSE array formula within my macro
I would like to define a variable as the row in which the value in column A in a sheet = value 1 and column B = value 2
within excel itself, the formula below works perfectly:
{=Match(1,(A:A=1)*(B:B=2),0)}
However, I would now like to use it within my macro along the lines of:
variable = {=Match(1,(Sheets("Right Sheet").range("A:A")=value1)*(Sheets("Right Sheet").range("B:B")=value2),0)}
Anyone able to provide any light on this?
I have played with all sorts of variants of ArrayFormula and had no success at all!
Ideally I would like my value1 and value2 numbers to be equal to variables (1 and 2) defined previously in my macro
Thanks in advance