Hi,
I'm trying to build a macro that uses a vlookup without using a set table array...since the numbers of rows i'm using to lookup would change monthly. Is it possible for me to set a variable to the table array and then call the variable inside the vlookup formula?
In my macro I'm using the following:
=VLOOKUP(A91,'Current Crosstab'!A1:P200,16,FALSE)
However, next month...this current crosstab worksheet may have up to 300 rows. I don't want to hardcode a large number, I want to be able to count the rows in Current Crosstab and then have the P column update itself in the vlookup formula. Any ideas on how to best accomplish this?
Thanks in advance for your help.
Honey
I'm trying to build a macro that uses a vlookup without using a set table array...since the numbers of rows i'm using to lookup would change monthly. Is it possible for me to set a variable to the table array and then call the variable inside the vlookup formula?
In my macro I'm using the following:
=VLOOKUP(A91,'Current Crosstab'!A1:P200,16,FALSE)
However, next month...this current crosstab worksheet may have up to 300 rows. I don't want to hardcode a large number, I want to be able to count the rows in Current Crosstab and then have the P column update itself in the vlookup formula. Any ideas on how to best accomplish this?
Thanks in advance for your help.
Honey