Using formulas for Date validation within 7, 14 and 30 days
Hi,
I am trying to use the following formula:
=IF[Due Date] <=7, "Red",
IF[Due Date] > 7 and <=14, "Yellow")
IF [Due Date] > 14 and < 30, "Green")
How do I do that, I tried to create a new column to show the colors, but I keep getting Invalid Operation.
=IF(([Due Date]1) > 7, (AND([Due Date]1) < 14), "Red"),
IF([Due Date]1) > 14, (AND([Due Date]1) < 30), "Yellow"),
IF([Due Date]1) > 30, "Green")
Any help is much appreciated!
Thank you,
Deepthi
Comments
-
It seems like you would want to incorporate a netdays or networkdays formula in there to compare the due-date to today and then if the difference falls in those ranges then flag the cell. Question, what should it be if the due date is in the past or less than 7 days? Should it still be red?
- https://help.smartsheet.com/function/netdays
- https://help.smartsheet.com/function/networkdays
- https://help.smartsheet.com/function/and
Below is the basic principle of how you should lay it out.
=IF(AND(This is true, This is true), then do this, IF(AND(This is true, This is true), then do this, if none are true do this)
=networkdays([due date]@row, today()) will give you the number of days that are different from the due date and today. Hope this helps.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 210 Industry Talk
- 441 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 300 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!