Construct cell reference for use in formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
=IF(INDIRECT("B"&MATCH(--"2005-01-01",A:A,0))="B","yes","no")

this assumes that the date exists, otherwise you get #N/A
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top