NOT and XOR

1 / 5

Chase every order that is neither Paid nor Cancelled. Those two are finished; everything else needs a reminder.

keyboard Typing formulas is easiest on a computer with a keyboard.

A1
ABCD
1OrderStatusAction
2ORD-2368Unpaid
3ORD-7534Overdue
4ORD-6187Overdue
5ORD-2144Unpaid
6ORD-3381Paid
7ORD-1438Pending
8ORD-6599Cancelled
9ORD-8791Overdue
10
11
12
13
status
Chase or OK
Type to enter a value or a formula starting with =. F2 edits, F4 adds $ to a reference.
Study notes

How NOT and XOR works

  • What does NOT do?

    NOT flips a condition: TRUE becomes FALSE and FALSE becomes TRUE. On its own, NOT(B2="Paid") is the same as B2<>"Paid". It earns its place around a bigger question:

    =NOT(OR(B2="Paid",B2="Cancelled"))

    That reads "neither Paid nor Cancelled", which is easier to get right than flipping each part by hand.

  • What does XOR do?

    XOR means "exclusive or": TRUE when exactly one of two conditions is TRUE, and FALSE when both or neither are.

    =XOR(B2="Yes",C2="Yes")

  • How is it different from OR?

    OR is TRUE when one or both are TRUE. Use XOR when "both" should not count: one weekend shift but not two, a phone number or an email but not both.

  • What about more than two conditions?

    XOR is TRUE when an odd number of them are TRUE. That's rarely what people mean, so with three or more, count them instead: =COUNTIF(B2:D2,"Yes")=1.

Know someone fighting with a spreadsheet? Send them this page.