SUMIF

Lennon

New Member
Joined
Oct 13, 2006
Messages
2
I kind of need to do the opposite to a sumif.

e.g. =sumif(A:A,"Contra", E:E)

This would sum all in column E were column A contains the word contra.

I need to sum everything but the contra. Is this possible?

Thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Lennon

New Member
Joined
Oct 13, 2006
Messages
2
Thank you.

I really thought I'd already tried this but I think I put the <> before the speechmarks instead of inside them.

Sorry to trouble you again but can this also be used in a range i.e. sum everything excluding contra and another word?
 

Domenic

MrExcel MVP
Joined
Mar 10, 2004
Messages
19,696
Try...

=SUM(E:E)-SUM(SUMIF(A:A,{"Contra","OtherWord"},E:E))

Hope this helps!
 

jmckeone

Well-known Member
Joined
Jun 3, 2006
Messages
550
similar issue for which I need an answer

I'm looking to something somewhat similar ... do a COUNTIF if one or another text string is present.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
Re: similar issue for which I need an answer

I'm looking to something somewhat similar ... do a COUNTIF if one or another text string is present.

=SUM(COUNTIF(A2:A100,{"X","Y"}))

would count the occurrences of the strings X and Y in A2:A100.
 

Forum statistics

Threads
1,136,310
Messages
5,675,002
Members
419,542
Latest member
shablagoo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top