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
- 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!