selection based on a date in a cell

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

Guest

Hi,

I want to put specific data into a cell, based on the date in another cell.
i.e. if the date is between two specific dates, populate the other cell with
"A", if between two other dates then "B" etc. I want to fill in a table of
the dates (which are financial periods 1 to 12), so if the date is in period
1, "P 01" is populated to a specific cell. Is this possible?

hope someone can help,
kind regards,

Matt
 
Try this:
Target 1 Target 2 Input Date Answer
A B C D
1 01/01/06 01/31/06 01/25/06 =if(C1>A1,if(C1<b1,"A","B"),"B")

....where A is your answer if it IS between the Target Dates, and B is the
answer if it isn't. For added sophistication, try this in D1:

=if(C1="","",if(C1>A1,if(C1<b1,"A","B"),"B")

This gets rid of the annoying error message if C1 is blank.
 
One way, among many, would be to just use an if starting with the highest
date
=if(date>highest,1,if(date>nexthighest,2,etc))
 

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