IF Statement to return a Date value
I'd like to create an nested If Statement to return a date based on meeting a specific condition. I'd like to be able to "hardcode" the date in the IF statement. Here is a quick example =IF([Value]1 = "Option2", 4/23/2019, IF([Value]1 = "Option2", 4/24/2019, 4/25/2019)) . If the date is quote wrapped ed "4/24/2019" then it doesn't return a date but instead returns a text value. If the date is not quote wrapped then the date gets updated in the formula to ex: 4 / 23 / 2019 and it returns a #DATE EXPECTED error message.
Tags:
Comments
-
You'll need to use the Date function...
=IF(Value@row="Option 1", Date(2019, 04, 23), IF(Value@row="Option 2", Date(2019, 04, 24), Date(2019, 04, 25))
Would work.
Help Article Resources
Categories
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!