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
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 458 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!