IF Statements with OR


#1

If there a way to write a formula that queries, basically, IF value X is in column C OR column D, then Y.

I just want to be able to filter a base to show only the records where a Name appears in either one of two columns, if that makes sense.

I wish the filter options weren’t by default AND, and could show all records that meet one of two filter conditions.

Am I overlooking an easy way to do this?

Javier


#2

Yes! :wink:

If you haven’t discovered this already, the construction you want is

IF(OR(ColumnC=X,ColumnD=X),This,That)

Essentially, you wrap all your ‘or’ conditions — and you’re not limited to two — within the call to OR(). That call is evaluated as a piece and returns TRUE is any of its component tests proves true. That call in turn becomes the test used to determine how the call to IF() branches. There are comparable AND() and XOR() functions, as well — and, of course, can be nested recursively to such a depth as to make your Airtable code as unreadable as mine…