IF-formula on a date range
Hi guys,
For the last couple of days I've been trying to create a simple formula, but in some way it doesn't work.
I want to check if the date of today falls inbetween a specific date range (2 different columns), using the IF-formula.
I've tried this formulas:
=IF(AND([Date 1]1>=TODAY(),[Date 2]1<=TODAY), "True", "False")
=IF(AND([Date 1]1>TODAY(),[Date 2]1<TODAY), "True", "False")
But it doesn't appear to be working.
Would be nice to hear from you,
Jordi
Best Answer
-
Switch your arguments so that [Date 1] is less than TODAY and [Date 2] is greater than TODAY.
Answers
-
-
The issue with your first formula is that you forgot the parenthesis for the second TODAY function.
You have:
=IF(AND(...................TODAY), ..........)
But it should be:
=IF(AND(...................TODAY()), ..........)
@RossL's solution has this corrected.
-
I've tried the formula that @RossL made, with the fixed parenthesis, but the formula appears to be unparseable...
-
Can you provide a screenshot of the formula you are using within the sheet along with the referenced columns similar to the screenshot below?
-
-
Try replacing True and False with the numbers 1 and 2. Does that make any difference?
-
Yes, that works
edit: it returns the value 2
-
Smartsheet doesn't seem to like using "True" and "False" values in formulas like that. I believe there was an instance where someone had a True column and a False column and it was throwing things off as well. It looks like you are going to want to adjust your output.
-
But now it returns the value 2, but that is not the correct one, isn't it?
Because TODAY is between those dates, so it should return 1?
-
Switch your arguments so that [Date 1] is less than TODAY and [Date 2] is greater than TODAY.
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!