ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SUMIF Not <> (https://www.excelbanter.com/excel-worksheet-functions/12172-sumif-not-%3C%3E.html)

Doug Laidlaw

SUMIF Not <>
 
I'm trying to sum a column of numbers if they do not equal a particular
value. For example in column A1:A5 I have Blue, Red, Green, Yellow, & Purple.
In B1:B5 I have random values, perhaps 10, 20, 30, 40, & 50.

I want to my SUMIf function to add everything except the Green value which
in this case is 30 per my example. What is the simplest way to acheive this?
Thank you!

JE McGimpsey

Simplest is probably:

=SUM(B1:B5)-SUMIF(A1:A5,"Green",B1:B5)


In article ,
Doug Laidlaw wrote:

I'm trying to sum a column of numbers if they do not equal a particular
value. For example in column A1:A5 I have Blue, Red, Green, Yellow, & Purple.
In B1:B5 I have random values, perhaps 10, 20, 30, 40, & 50.

I want to my SUMIf function to add everything except the Green value which
in this case is 30 per my example. What is the simplest way to acheive this?


Harlan Grove

JE McGimpsey wrote...
Simplest is probably:

=SUM(B1:B5)-SUMIF(A1:A5,"Green",B1:B5)

....

!?

Why not

=SUMIF(A1:A5,"<Green",B1:B5)

?


JE McGimpsey

Because I was answering a different question than was asked??? Or
perhaps my head was elsewhere. Dunno...

Thanks for the correction.

In article . com,
"Harlan Grove" wrote:

!?

Why not

=SUMIF(A1:A5,"<Green",B1:B5)



All times are GMT +1. The time now is 06:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com