# How to use sumif with condition 'not in list'?

Hello,

I try to use sumif (actually, sumifs, but this should have no impact on my problem) but the condition I want to use is 'if X is not in list Y' and Y is a range of cells. Example:

A B C

1 Apple Apple 2

2 Banana Apple 2

3 Pineapple Banana 3

4 Apple 2

5 Broccoli 5

6 Pineapple 13

(I'm sorry for the horrible implementation of that table here ;).)

Now, I wanna add all numbers from column C if the corresponding cell in column B is not in the list from A1:A3.

In this case, it's only Broccoli in B5.

Of course, I could use one of the following manual solutions:

`=SUMIFS(D1:D6, C1:C6, "<>" & A1, C1:C6, "<>" & A2, C1:C6, "<>" & A3)`

`=SUMIFS(D1:D6, C1:C6, "<>Apple", C1:C6, "<>Banana", C1:C6, "<>Pineapple")`

(Although I don't have a clue why you have to type `"<>" & A1`

instead of just `<>A1`

. If you can tell me that, I'd be thankful!)

But I'm a bit lazy and also interested in if and how it's possible to automize it a bit.

Actually, I want to use sumifs and I'm also using a condition to check the date. I'm creating a 'fancy' spreadsheet to calculate on what topics I'm spending money and this is for some nice statistics.

I am using Kubuntu 10.14 and LibreOffice Calc Version: 4.3.3.2.

Best regards