Look at a date and return a value
I have been struggling to look at a date, write a formula to determine of the date falls between 2 dates and return a value.
Date = 03/03/25
If date is greater than 03/31/23 and less than 04/01/24, return 23
This works for just the greater than date but as soon as I try to add the less than date, I get an incorrect argument.
Best Answer
-
Here's a formula that might work for you. Just substitute the name for your column for "ColumnName" in the formula below.
=IF(AND(ColumnName@row > DATE(2023, 3, 31), ColumnName@row < DATE(2024, 4, 1)), 23)
Answers
-
Here's a formula that might work for you. Just substitute the name for your column for "ColumnName" in the formula below.
=IF(AND(ColumnName@row > DATE(2023, 3, 31), ColumnName@row < DATE(2024, 4, 1)), 23)
-
This works😀 Now how do I expand the next part of the formula for the dates 2024, 3, 31 and 2025, 4, 1 to return a value of 24?
Also if the date column is blank, can I include formatting to not input a value?
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!