How to Create Dynamic Range in Formula

T

tobrien871

I have a formula using a vlookup command. I want the range of the looku
table within my formula to change based on the date I enter in
separate cell.

For example, If the date I enter into a separatecell matches the dat
that is the heading for my first column of my array, that first colum
would be the start of the range in the vlookup formula. For example, i
I type 6/6/04, and my column heading matches that date, then I want th
vlookup array to use the first column in its formula, which is
=VLOOKUP(A5,SongSelect!M$2:$AM$90,27,FALSE) . If, however, I ente
6/13/04, ibecause 6/13/04 is the heading for column N, I want tha
column used in the range in place of M. Everything else would remai
unchanged.

I'd like to do this with no macros, and no snarly IF statements.
think I can use 2 lookups. One for the main formula and one tha
matches the date, and returns a column letter to stick into the mai
vlookup formula, but I don't know how to have a formula change lik
that.

Thanks for your help, gang!
-To
 
D

Don Guillett

Have a look at HELP index for INDIRECT. Wouldn't it be easier to keep the
range and vary the lookup column from 27 to 26 instead?
 
Top