Why is my SUMIFS formula with 2 "DNE" criteria (w/in the same row) acting as an "OR" instead of an "AND?"

carlcryptocurrency

New Member
Joined
Dec 8, 2017
Messages
4
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<tbody>[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] "]Name[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] "]Tx[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] "]Product[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: right"]Price[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: right"]Fees[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: right"]Total[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Purchase[/TD]
[TD]Widget[/TD]
[TD="align: right"]$500.00[/TD]
[TD="align: right"]$55.00[/TD]
[TD="align: right"]$555.00[/TD]
[/TR]
[TR]
[TD]Rob[/TD]
[TD]Credit[/TD]
[TD]Flibbity Jibbet[/TD]
[TD="align: right"]$400.00[/TD]
[TD="align: right"]$1.00[/TD]
[TD="align: right"]$401.00[/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]Credit[/TD]
[TD]Clown[/TD]
[TD="align: right"]$300.00[/TD]
[TD="align: right"]$5.00[/TD]
[TD="align: right"]$305.00[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Purchase[/TD]
[TD]Poppins[/TD]
[TD="align: right"]$250.00[/TD]
[TD="align: right"]$30.00[/TD]
[TD="align: right"]$280.00[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Debit[/TD]
[TD]Widget[/TD]
[TD="align: right"]$125.00[/TD]
[TD="align: right"]$8.00[/TD]
[TD="align: right"]$133.00[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Purchase[/TD]
[TD]Flibbity Jibbet[/TD]
[TD="align: right"]$10.00[/TD]
[TD="align: right"]$15.00[/TD]
[TD="align: right"]$25.00[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Credit[/TD]
[TD]Clown[/TD]
[TD="align: right"]$775.00[/TD]
[TD="align: right"]$10.00[/TD]
[TD="align: right"]$785.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5, align: right"]"=SUMIFS(F2:F8,A2:A8,"<>John",B2:B8,"<>Purchase")"is omitting rows 2, 5, 7, & 8 for a total of[/TD]
[TD="align: right"]$839.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] "]Name[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] "]Tx[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] "]Product[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: right"]Price[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: right"]Fees[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=D9D9D9]#D9D9D9[/URL] , align: right"]Total[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Purchase[/TD]
[TD]Widget[/TD]
[TD="align: right"]$500.00[/TD]
[TD="align: right"]$55.00[/TD]
[TD="align: right"]$555.00[/TD]
[/TR]
[TR]
[TD]Rob[/TD]
[TD]Credit[/TD]
[TD]Flibbity Jibbet[/TD]
[TD="align: right"]$400.00[/TD]
[TD="align: right"]$1.00[/TD]
[TD="align: right"]$401.00[/TD]
[/TR]
[TR]
[TD]George[/TD]
[TD]Credit[/TD]
[TD]Clown[/TD]
[TD="align: right"]$300.00[/TD]
[TD="align: right"]$5.00[/TD]
[TD="align: right"]$305.00[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Purchase[/TD]
[TD]Poppins[/TD]
[TD="align: right"]$250.00[/TD]
[TD="align: right"]$30.00[/TD]
[TD="align: right"]$280.00[/TD]
[/TR]
[TR]
[TD]Karen[/TD]
[TD]Debit[/TD]
[TD]Widget[/TD]
[TD="align: right"]$125.00[/TD]
[TD="align: right"]$8.00[/TD]
[TD="align: right"]$133.00[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Purchase[/TD]
[TD]Flibbity Jibbet[/TD]
[TD="align: right"]$10.00[/TD]
[TD="align: right"]$15.00[/TD]
[TD="align: right"]$25.00[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Credit[/TD]
[TD]Clown[/TD]
[TD="align: right"]$775.00[/TD]
[TD="align: right"]$10.00[/TD]
[TD="align: right"]$785.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5, align: right"]What do we do so it only omits rows 2 & 7 for an accurate total of[/TD]
[TD="align: right"]$1,904[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Carl, your SUMIFS is essentially saying this (in words):

"Sum up all values from column F from among the subset that first eliminates every instance of 'John' and then further eliminates 'Purchase' from the remaining options."

And that's not what you want.

Give this a try:

Code:
=SUMPRODUCT((A2:A8&B2:B8 <> "JohnPurchase")*(F2:F8))
 
Upvote 0
Your intent is:

=SUM(F2:F8)-SUMIFS(F2:F8,A2:A8,"john",B2:B8,"purchase")

where the SUMIFS bit indeed runs as it were, an and.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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
Back
Top