Specify multiple criteria as arguments and return true if at least one is true; otherwise, it is false.
Criteria can be specified individually with arguments or as an array. If an array is specified, the second and subsequent arguments are ignored.
You can specify any number of criteria.
If no criteria are specified, false is returned.
The following example returns true if the month was either 4, 6, 9, or 11 or false otherwise.
= or(month=4, month=6, month=9, month=11)
The same as the above example, with an array, looks like this:
= or([month=4, month=6, month=9, month=11])
The same can also be written like this: Note that in this way, if the left and right sides are reversed, it will not work.
= or([4, 6, 9, 11] = month)
The OR function can also be used as the first argument to the if function. The following example returns the string “Target” if the prefecture is Tokyo, Osaka, or Aichi; otherwise, it returns the String “Not Targeted”.
= if(or(prefecture = "Tokyo", prefecture = "Osaka", prefecture = "Aichi"), "Target", "Not Targeted")
An array can also be combined with tables and multi-select fields. The following example returns true if “Other” is selected in the Checkbox field.
= or(checkbox = "Other")