Boxbot
Boxbot

Reputation: 121

SUMIF when cells do not contain "text a" OR "text b" (LibreOffice-Calc)

I've got a spreadsheet of purchase information that has the following format:

Account Category Withdraw Deposit
CC Home 21.22
Checking Payment 21.22
CC Payment 21.22
CC Transit 50.00
Checking Income 5000
CC Food 31.49
CC Hobbies 15.00
Checking Transfer 3000
Savings Transfer 3000

I want to sum all values in the Withdraw column that do not have the category "Payment" or "Transfer" in the same row.

I can get one or the other with something like =SUMIF(B:B,"<>Payment",C:C), but I can't figure out how to exclude both.

=SUMIF(B:B,"<>Payment"&"<>Transfer",C:C) doesn't give me the correct value, and =SUMIF(B:B,AND("<>Payment","<>Transfer"),C:C) gives me an error.

I feel like there's an operator combination for this that I just haven't been able to find?

Upvotes: 2

Views: 6786

Answers (1)

Boxbot
Boxbot

Reputation: 121

Completely missed that SUMIFS existed, as @xerx593 pointed out. =SUMIFS(C:C,B:B,"<>Payment",B:B,"<>Transfer") gives the results I was looking for.

Upvotes: 1

Related Questions