May 23, 2019 09:32 PM
Can we combine 2 things in an “IF” statement using “AND” or “&”?
For example, what if we wanted to compare 2 different sets of date fields. In other words, if I was using plain English, I would want to say something like this:
IF ( IS_AFTER({Event Start Date}, {Location Start Date}) AND IS_BEFORE ({Event End Date}, {Location End Date}), "Yes", "No" )
or I would want to say something like this:
IF( {Event Start Date} > {Location Start Date} AND {Event End Date} < {Location End Date}, "Yes", "No"
I know that both of those formulas are invalid formulas, but I’d love to say something like that in Airtable, using Airtable’s syntax.
Thanks! :slightly_smiling_face:
May 23, 2019 09:56 PM
You would do this: IF(AND(IS_AFTER({Event Start Date}, {Location Start Date}),IS_BEFORE({Event End Date}, {Location End Date})),"Yes","No")
or do this IF(AND({Event Start Date} > {Location Start Date},{Event End Date} < {Location End Date}),"Yes","No")
Basically, use AND()
as the first argument in the IF()
statement. For your reference, OR()
works the same way.
May 24, 2019 09:58 AM
@Kamille_Parks, this is fantastic! Thank yo so much for outlining this for me! I greatly appreciate it! :slightly_smiling_face: