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
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!