Sumifs with posetive criteria array and negative criteria array

Rsdg

New Member
Joined
Jul 7, 2022
Messages
15
Office Version
  1. 2016
Platform
  1. Windows
First of all sorry for my English
Hello , i have problem with sumifs formula, I have 3 condition and one of them is negative, i tried this formula but the answers is just effect one of my negative cell , i have the example table for my problem in the attachment , thanks

{=SUM(SUMIFS(L12:L20,H12:H20,B2,J12:J20,H2:J2,K12:K20,"<>"&H3:J3))}
2.JPG
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Welcome to the Forum!

Your formula is actually summing income for three possibilities, and adding these together:
- topic code = 219 and specified code <> 9,
- topic code = 221 and specified code <> 10, and
- topic code = 233 and specified code <>11.

I think what you want is:

=SUMPRODUCT(L12:L20,--(H12:H20=B2),--ISNUMBER(MATCH(J12:J20,H2:J2,)),--ISERROR(MATCH(K12:K20,H3:J3,)))

and you probably want to test city as well?

=SUMPRODUCT(L12:L20,--(H12:H20=B2),--(I12:I20=C2),--ISNUMBER(MATCH(J12:J20,H2:J2,)),--ISERROR(MATCH(K12:K20,H3:J3,)))

When you next post, please use XL2BB (rather than attaching a picture) which you can download here: XL2BB - Excel Range to BBCode

Then we copy your example directly into Excel, rather than having to re-type.
 
Upvote 0
Solution
Welcome to the Forum!

Your formula is actually summing income for three possibilities, and adding these together:
- topic code = 219 and specified code <> 9,
- topic code = 221 and specified code <> 10, and
- topic code = 233 and specified code <>11.

I think what you want is:

=SUMPRODUCT(L12:L20,--(H12:H20=B2),--ISNUMBER(MATCH(J12:J20,H2:J2,)),--ISERROR(MATCH(K12:K20,H3:J3,)))

and you probably want to test city as well?

=SUMPRODUCT(L12:L20,--(H12:H20=B2),--(I12:I20=C2),--ISNUMBER(MATCH(J12:J20,H2:J2,)),--ISERROR(MATCH(K12:K20,H3:J3,)))

When you next post, please use XL2BB (rather than attaching a picture) which you can download here: XL2BB - Excel Range to BBCode

Then we copy your example directly into Excel, rather than having to re-type.
Thank you , your formula worked , thanks again
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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