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
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
-
No problem at all! I'm glad that worked for you. 🙂
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 146 Just for fun
- 63 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!