![]() |
Need help with a date check formula
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. |
Need help with a date check formula
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 "Dan B" wrote in message ... 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. |
Need help with a date check formula
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. "Trevor Shuttleworth" wrote in message ... 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 "Dan B" wrote in message ... 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. |
Need help with a date check formula
="text"&TEXT(A1,"m")
"Dan B" wrote: 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. |
Need help with a date check formula
Answere for question 2:
="text"&TEXT(A1,"m")&" - "&"text"&TEXT(A2,"m") "Dan B" wrote: 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. |
Need help with a date check formula
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. In article , "Dan B" wrote: 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. |
Need help with a date check formula
Thanks for all the answers. Those got me what I needed.
Thanks Again, Dan "JE McGimpsey" wrote in message ... 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. In article , "Dan B" wrote: 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. |
Need help with a date check formula
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 "Dan B" wrote: 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. "Trevor Shuttleworth" wrote in message ... 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 "Dan B" wrote in message ... 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. |
All times are GMT +1. The time now is 08:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com