Need help with a date check formula

  • Thread starter Thread starter Dan B
  • Start date Start date
D

Dan B

I have a column of dates and I need a formula that will check to see what
month the date is in and then put text in another cell depending on what the
result is. So, if the date in A1 is in January then B1 = "text1", if A1
date is in February then B1="text2"...and so on for all months.

Also, I would need another formula that will do the same, except I need it
to look at a specific date range, instead of just the month. Like 1/15/07
through 2/28/07.

The dates in the column are formatted as mm/dd/yyyy

Thanks for the help.
 
One way for the first part:

=CHOOSE(MONTH(A1),"text1","text2","text3","text4","text5","text6",
"text7","text8","text9","text10","text11","text12")

I think you need to provide more detail for the second part, for example,
what are the date ranges ?

Regards

Trevor
 
Thanks for the first part. That worked good.

The date range on the second part is not always known, so the formula would
need to be edited to whatever date range is needed at the time. I just need
to check for dates that are in whatever range is put into the formula.
Maybe that's not possible. Hope that makes sense.
 
One way:

=TEXT(A1,"t\extm")

for the second question, what output are you expecting?

Note that the display format of the dates is irrelevant.
 
If you only have 1 date range to check...

=IF(AND(A1>=DATE(2007,1,15),A1<=DATE(2007,2,28)),"x","y")

If you have multiple contiguous date ranges then checkout LOOKUP or post
back with more details
 

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