Question : Nested Vlookup within Hlookup

Hello,

I have dates in column A2:A13 and want to use a nested vlookup/hlookup statment to pull data from another tab (data tab) with column headers c1:c255.  I will be changing the dates each month so need this formula to refernece the date (A1:A13) and the data within that line for columns c1:c255.  The data below is on the data tab
              c1        c2       c3       c4
Sep-05    100     200     250    350
Oct-05     75        85      10     99
Nov-05    100      142     392    74

I want to pull this data from the data tab within the tab below:

               c1        c2       c3       c4
Sep-05    
Oct-05    
Nov-05    

Answer : Nested Vlookup within Hlookup

nmolliconi

With the dates in column A and c1 to c4 on row 1 this will lookup the values in the original table which is a range named 'data'.

=IF(ISERROR(VLOOKUP($A2,data,--MID(B$1,2,2)+1,FALSE)),"Cannot find date",VLOOKUP($A2,data,--MID(B$1,2,2)+1,FALSE))

Hope that helps

Patrick
Random Solutions  
 
programming4us programming4us