View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
zvkmpw zvkmpw is offline
external usenet poster
 
Posts: 153
Default Referring to a cell by using another cell for the row number

On one tab I have data that looks like this:

8/1/2012
1 29381
2 2423

8/2/2012
5 23231
8 7542

On the second tab I would like to automatically pull this data
depending on what today's date is.

So, for example, I would like to do a VLOOKUP for "1" on 8/1/2012.

So on the second tab, in A1, I have created a formula to tell me what
row to start my VLOOKUP on.

I have also created a formula, in A2, that tells me where to end
my VLOOKUP

Now I would like to write the VLOOKUP so it pulls from A2:B3 on the
second tab.


Maybe this would help get started:
=VLOOKUP(1,OFFSET(FirstTab!$A$1,$A$1-1,0,$A$2-$A$1+1,2),1,FALSE)
to pull column A, and
=VLOOKUP(1,OFFSET(FirstTab!$A$1,$A$1-1,0,$A$2-$A$1+1,2),2,FALSE)
to pull column B.