OR returns either TRUE or FALSE. For example, to test A1 for either x or y, use =OR(A1=x,A1=y). The OR function can be used as the logical test inside the IF function to avoid extra nested IFs, and can be combined with the AND function. Purpose.