View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SupperDuck SupperDuck is offline
external usenet poster
 
Posts: 44
Default Vlookup in vlookup - taking the result as array name

Hello all,

I have an array called "months" and for ex. it has the values;

1 Jan
2 Feb
3 Mar

And i have 12 arrays named: Jan, Feb... And the arrays has values, for ex;

Array Jan:
prt1 2
prt2 3
prt3 5

Array Feb:
prt1 6
prt2 4
prt3 2


I want to do this;

=vlookup("prt1", vlookup(1, months, 2, 0), 2, 0)

So, it will look for prt1 in array Jan and have a result as 2.

As you see, i want to use the result in the second vlookup as the name of
the array for the first vlookup.

I can do this in a macro but i wonder how i can do this in a formula?

Thanks & regards,