Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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, |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
It looks like you simply need to wrap the inner VLOOKUP with an INDIRECT
=vlookup("prt1",INDIRECT( vlookup(1, months, 2, 0)), 2, 0) "SupperDuck" wrote: 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, |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Wonderful! That was what i need..
Thanks, Regards, "SupperDuck" wrote: 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, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup shows result one cell above the expected result | Excel Worksheet Functions | |||
Vlookup only taking first line of data | Excel Discussion (Misc queries) | |||
Vlookup only taking first line of data | Excel Discussion (Misc queries) | |||
vlookup based on random result returns incorrect result | Excel Worksheet Functions | |||
Vlookup: Have problem. Not taking the object that i search... | Excel Discussion (Misc queries) |