Construct cell reference for use in formula

A

AG

I have Dates in column A with an associated text in column B.
How do I evaluate the text in an If function for a given Date when I don't
know which row I need?

If I knew 1/1/05 was in row 10, I use IF(B10="B"
but how do I construct this refernce when I don't know that I want row 10?
 
B

Bob Phillips

=IF(INDIRECT("B"&MATCH(--"2005-01-01",A:A,0))="B","yes","no")

this assumes that the date exists, otherwise you get #N/A
 
R

Ron Rosenfeld

I have Dates in column A with an associated text in column B.
How do I evaluate the text in an If function for a given Date when I don't
know which row I need?

If I knew 1/1/05 was in row 10, I use IF(B10="B"
but how do I construct this refernce when I don't know that I want row 10?

Look at the MATCH, INDEX and VLOOKUP functions.


--ron
 
A

AG

Works as needed; thanks.

Bob Phillips said:
=IF(INDIRECT("B"&MATCH(--"2005-01-01",A:A,0))="B","yes","no")

this assumes that the date exists, otherwise you get #N/A
 
Top