IF function to return value based on dates
I am trying to get a value when I put in a particular date
If a person puts a date in the Target completion field, I want to return a Sprint in the Sprint field. I dont know if I can use the month or does it have to be between? For example
=IF([Target Completion Date]@row) is between 8/1/2024 and 8/31/2024 then return "Sprint 1"
OR
=IF([Target Completion Date]@row) is in month 8 then return "Sprint 1"
I want to keep going with month 9, month 10…etc. And if it is blank, return "BLANK
Answers
-
Hey @Gina Prego,
You should be able to use a formula like this:
=IFERROR(IF(Month([Target Completion Date]@row) = 1, "January Sprint", IF(Month([Target Completion Date]@row) = 2, "February Sprint, IF(Month([Target Completion Date]@row) = 3, "March Sprint, etc…))), "")
You should be able to chain this through all the months! You can use IFERROR to return a blank cell if the date is empty, or you can include an IF statement in the chain that reads:
IF(ISBLANK([Target Completion Date]@row), "")
Hope that makes sense!
If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!
I'm always looking to connect with other industry professionals, feel free to connect with me on LinkedIn as well!
-
That didn't seem to help. So if my date is 6/15/2024 in the column Target Completion Date, I want to return "Sprint 1" on my column labeled Sprint. If my date is 6/29/2024 in the column Target Completion Date, I also want to return "Sprint 1" on my column labeled Sprint because it is in the month of June. If it is July 7 or July 15 or July 25, I want it to be Sprint 2. Target completion date is an actual date, not just a month. I hope this is a less confusing description
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!