Sumifs with AND OR {} ?

ljubo_gr

Board Regular
Joined
Dec 6, 2014
Messages
244
Office Version
  1. 2016
Platform
  1. Windows
Hello the best excel, MREXCEL!
I have two columns, first is numbers, second is text.
I have long sumifs formula, it gets job done, but is it possible to shorten formula?
Code:
=SUMIFS(F3:F12;F3:F12;">1000";I3:I12;"<>S-10";I3:I12;"<>S-11";I3:I12;"<>S-9";I3:I12;"<>S-5";I3:I12;"<>S-6";I3:I12;"<>S-12")

This not working:
Code:
=SUMIFS(F3:F12;F3:F12;">1000";I3:I12;{"<>S-10"\"<>S-11"\"<>S-9"\"<>S-5"\"<>S-6"\"<>S-12"})
where is \ in english goes comma. Result:
Code:
={102986\70837\134594\134594\134594\134594}
Thank you in advance, God bless!

p.S. Also, thanks to ExcelIsFun, i cannot, i think, have eg. "<>S-10":"<>S-9": .... rows are dynamic, i0m using sorting.
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Code:
=SUMPRODUCT((F3:F12>1000)*ISTEXT(MATCH(I3:I12;{"<>S-11"\"<>S-10"\"<>S-6"\"<>S-5"\"<>S-9"};0)))
Not working, also, is getting too long :(
 
Upvote 0
You can use fomula:
Code:
=SUMPRODUCT((F3:F12>1000)*(I3:I12<>{"S-10","S-11","S-9","S-5","S-6","S-12"})*F3:F12)
 
Upvote 0
You can use fomula:
Code:
=SUMPRODUCT((F3:F12>1000)*(I3:I12<>{"S-10","S-11","S-9","S-5","S-6","S-12"})*F3:F12)
Allready tried this formula, result is not 39229 :(

Code:
=SUMPRODUCT({0\0\0\0\0\0;0\0\0\0\0\0;0\0\0\0\0\0;0\0\0\0\0\0;0\0\0\0\0\0;3752\3752\3752\3752\3752\3752;6501\6501\6501\6501\6501\6501;0\31608\31608\31608\31608\31608;28976\28976\28976\28976\28976\28976;62757\0\62757\62757\62757\62757})
so I need to sum only 3752, 6501, 28976=39229 units.
 
Last edited:
Upvote 0
Allready tried this formula, result is not 39229 :(
sorry, this formula is not right, you try this formula:
Code:
=SUMPRODUCT(NOT(ISNUMBER(MATCH(I3:I12,{"S-10","S-11","S-9","S-5","S-6","S-12"},)))*(F3:F12>1000)*F3:F12)
Or
Code:
=SUM(IF(MMULT(--(I3:I12<>{"S-10","S-11","S-9","S-5","S-6","S-12"}),ROW($1:$6)^0)=6,(F3:F12>1000)*F3:F12))
Entered with Ctrl+Shift+Enter!!!
 
Upvote 0
sorry, this formula is not right, you try this formula:
Code:
=SUMPRODUCT(NOT(ISNUMBER(MATCH(I3:I12,{"S-10","S-11","S-9","S-5","S-6","S-12"},)))*(F3:F12>1000)*F3:F12)

Thanks! Sumproduct is ok.
 
Upvote 0
If you want formula shoter, you created range A1:A6={"S-10";"S-11";"S-9";"S-5";"S-6";"S-12"}, after you use this formula:
Code:
=SUMPRODUCT((COUNTIF(A1:A6,I3:I12)=0)*(F3:F12>1000)*F3:F12)
Hope to help you!!
 
Upvote 0

Forum statistics

Threads
1,215,778
Messages
6,126,841
Members
449,343
Latest member
DEWS2031

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