Exclude items with SUMIFS

flora1

New Member
Joined
Nov 27, 2017
Messages
48
=SUMIFS(Data!$D$2:$D$3924,Data!$A$2:$A$3924,B$2,Data!$B$2:$B$3924,$A3)

i have my criterias,

now on the column F of Data sheet. i want to exclude if any value of these three value 115 and 145 and XXII
and in column G i want to include only if the cell starts with 6 or 5 or 7


thanks.
 
Jomno1

you are genius, just like Aladin. "brilliant minds think alike"

i put the double qoutes and it worked.

Code:
=SUMPRODUCT(DataAMOUNT,--ISNUMBER(MATCH(DataYear&"",B$2,0)),--ISNUMBER(MATCH(DataMonth&"",$A3,0)),--ISNUMBER(MATCH(LEFT(DataPRODUCT),{5,6,7}&"",0)))

$B2 and $A3 are both single values, so I'd think we should better try an equality test...

=SUMPRODUCT(DataAMOUNT,--(DataYear=B$2+0),--(DataMonth=$A3+0),--ISNUMBER(MATCH(LEFT(DataPRODUCT),{5,6,7}&"",0)))
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,215,793
Messages
6,126,936
Members
449,349
Latest member
Omer Lutfu Neziroglu

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