Criteria >=""

broth

New Member
Joined
Nov 5, 2012
Messages
30
Office Version
  1. 365
I have a formula that is supposed to return a value in one column based on multiple criteria in multiple columns. One of the criteria is that if the criteria cell is blank ("") or the word "ALL" is selected then the criteria for the column will be blank or not blank. The other criteria option is a specific match. How do you specify that the criteria includes everything or a specific value?
Formula in I16 = =SUMIFS($G$3:$G$16,$B$3:$B$16,IF(OR(J15="",J15="ALL"),">="&"",J15),$C$3:$C$16,IF(OR(J11="",J11="ALL"),">="&"",J11),$D$3:$D$16,IF(OR(J12="",J12="ALL"),">="&"",J12),$E$3:$E$16,IF(OR(J13="",J13="ALL"),">="&"",J13),$F$3:$F$16,IF(OR(J14="",J14="ALL"),">="&"",J14))


1687380380814.png
 

Attachments

  • 1687380294256.png
    1687380294256.png
    79.5 KB · Views: 5

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
SUMIFS can be quite finicky about what parameters you use, especially between numeric and non-numeric data. I expect that the problem is how you set up the parameters you used for the ALL cases, like ">="&"". Instead of that, try "<>.1" where the .1 is a value that will never exist in any column. This should work for both numeric and non-numeric values. For example:

Book1
ABCDEFGHI
1DateCost CodeJob #ReleasePart #UnitsDepartment3002
21-Jun300537701.UNVA014Job3760
32-Jun300637701.UNVA01MP1026Release1.USVA01
43-Jun30063770MP1028Part #MP107
54-Jun300737701.UNVA019Date6-Jun
65-Jun300437601.UNVA0110
76-Jun300237601.USVA01MP10713Qty=13
87-Jun30023770MP10810
98-Jun3002377010
109-Jun300337709Department3006
1110-Jun300337701.UNVA019Job3770
1211-Jun30063770MP10831Release
1312-Jun30063770MP10233Part #MP102
1413-Jun3002377010Date
1514-Jun3003377012
16Qty=47
Sheet1
Cell Formulas
RangeFormula
I7,I16I7=LET(p,IF((I1:I5="")+(I1:I5="ALL"),"<>.1",I1:I5),SUMIFS(F:F,A:A,INDEX(p,5),B:B,INDEX(p,1),C:C,INDEX(p,2),D:D,INDEX(p,3),E:E,INDEX(p,4)))


2 quick suggestions to help you get more and faster responses. Using XL2BB makes it easier for the helpers here to work on your problem. Also, please update your profile to show what version of Excel you're using. I used LET in my example, but I don't know if it will work for you. If not, try using "<>.1" in your current formula. Good luck!
 
Upvote 0
Another approach:
Excel Formula:
=SUMPRODUCT(SUMIFS($G$3:$G$16,
$B$3:$B$16,IF(OR(J15={"","ALL"}),">="&MIN($B$3:$B$16),J15),
$C$3:$C$16,IF(OR(J11={"","ALL"}),">="&MIN($C$3:$C$16),J11),
$D$3:$D$16,IF(OR(J12={"","ALL"}),">="&MIN($D$3:$D$16),J12),
$E$3:$E$16,IF(OR(J13={"","ALL"}),{"","*"},J13),
$F$3:$F$16,IF(OR(J14={"","ALL"}),{"";"*"},J14)))
 
Upvote 0
SUMIFS can be quite finicky about what parameters you use, especially between numeric and non-numeric data. I expect that the problem is how you set up the parameters you used for the ALL cases, like ">="&"". Instead of that, try "<>.1" where the .1 is a value that will never exist in any column. This should work for both numeric and non-numeric values. For example:

Book1
ABCDEFGHI
1DateCost CodeJob #ReleasePart #UnitsDepartment3002
21-Jun300537701.UNVA014Job3760
32-Jun300637701.UNVA01MP1026Release1.USVA01
43-Jun30063770MP1028Part #MP107
54-Jun300737701.UNVA019Date6-Jun
65-Jun300437601.UNVA0110
76-Jun300237601.USVA01MP10713Qty=13
87-Jun30023770MP10810
98-Jun3002377010
109-Jun300337709Department3006
1110-Jun300337701.UNVA019Job3770
1211-Jun30063770MP10831Release
1312-Jun30063770MP10233Part #MP102
1413-Jun3002377010Date
1514-Jun3003377012
16Qty=47
Sheet1
Cell Formulas
RangeFormula
I7,I16I7=LET(p,IF((I1:I5="")+(I1:I5="ALL"),"<>.1",I1:I5),SUMIFS(F:F,A:A,INDEX(p,5),B:B,INDEX(p,1),C:C,INDEX(p,2),D:D,INDEX(p,3),E:E,INDEX(p,4)))


2 quick suggestions to help you get more and faster responses. Using XL2BB makes it easier for the helpers here to work on your problem. Also, please update your profile to show what version of Excel you're using. I used LET in my example, but I don't know if it will work for you. If not, try using "<>.1" in your current formula. Good luck!
I tried your
SUMIFS can be quite finicky about what parameters you use, especially between numeric and non-numeric data. I expect that the problem is how you set up the parameters you used for the ALL cases, like ">="&"". Instead of that, try "<>.1" where the .1 is a value that will never exist in any column. This should work for both numeric and non-numeric values. For example:

Book1
ABCDEFGHI
1DateCost CodeJob #ReleasePart #UnitsDepartment3002
21-Jun300537701.UNVA014Job3760
32-Jun300637701.UNVA01MP1026Release1.USVA01
43-Jun30063770MP1028Part #MP107
54-Jun300737701.UNVA019Date6-Jun
65-Jun300437601.UNVA0110
76-Jun300237601.USVA01MP10713Qty=13
87-Jun30023770MP10810
98-Jun3002377010
109-Jun300337709Department3006
1110-Jun300337701.UNVA019Job3770
1211-Jun30063770MP10831Release
1312-Jun30063770MP10233Part #MP102
1413-Jun3002377010Date
1514-Jun3003377012
16Qty=47
Sheet1
Cell Formulas
RangeFormula
I7,I16I7=LET(p,IF((I1:I5="")+(I1:I5="ALL"),"<>.1",I1:I5),SUMIFS(F:F,A:A,INDEX(p,5),B:B,INDEX(p,1),C:C,INDEX(p,2),D:D,INDEX(p,3),E:E,INDEX(p,4)))


2 quick suggestions to help you get more and faster responses. Using XL2BB makes it easier for the helpers here to work on your problem. Also, please update your profile to show what version of Excel you're using. I used LET in my example, but I don't know if it will work for you. If not, try using "<>.1" in your current formula. Good luck!
I used "<>"&.1 and it worked. Thanks.
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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