# Look at a date and return a value

Options
✭✭

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.

Options

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)

Options

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)

• ✭✭
edited 01/04/24
Options

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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!