IF/AND Formula with Dates
Hi all,
I am trying to create a formula that will apply an X to a cell if the selected Date is between two other Dates (ie. Check In and Check Out dates).
Currently I have a formula similar to what you would use in Excel:
=IF(AND([TUESDAY 4/20]17 >= [CHECK-IN]@row, [TUESDAY 4/20]17 <= [CHECK-OUT]@row), "X")
Check In and Check Out columns are Date Format.
"Tuesday 4/20" Column is just a Text/Number Column and is where I would like to have an "X" appear.
Thanks in advance for any insight!
Answers
-
Hi @Jen Evans
Since you're referencing a text/number cell in your "Tuesday 4/20" column, your formula is unable to recognize this as a date. You would either need to change the column type to be a Date type of column so that the cell in row 17 can be recognized as a date, or you would need to identify out the date in a DATE function within the formula. Ex:
=IF(AND(DATE(2021, 04, 20) >= [CHECK-IN]@row, DATE(2021, 04, 20) <= [CHECK-OUT]@row), "X")
Let me know if this makes sense or if I can help clarify anything further!
Cheers,
Genevieve
-
-
No problem at all! I'm glad that worked for you. 🙂
Help Article Resources
Categories
Check out the Formula Handbook template!