Sumifs function with 6 criteria including blank

londoneye001

Board Regular
Joined
Sep 12, 2014
Messages
56
Hey Mr. Excel,

i could do with a bit of help here. I got 6 criteria for different product grade in total and some of the criteria fields are blank because we don't have a particular grade for those products. Obviously, i opted in for SUMIFS function but it turned out sumifs cannot handle blank critera, so at the moment I got the formula working using huge if and vlookup function but i believe there must be alternate simpler solution. Can you please help?

My data set is in this format and I pull values from a different tab and each months my columns for the data set is different.

These are my criteria:

A B C D E F

Off Grade AAAAAAPrimeOther
51523 5452355523
5452455524
5443155431
543385533852338
5443855438
532125441155411

<colgroup><col><col span="5"></colgroup><tbody>
</tbody>


My dataset on a different tab is follows and based on the product # criteria I pull qty in a different column and weight in a different column. Again this dataset is on a seperate tab that I call "DataDump"


Product#"PLU DescriptionQty Weight
532121570000 BEEF LIVER18408.74
54431541000 BNLS BEEF FLANK 377.73

<colgroup><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>

Thanks for your help.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I read an article online somewhere, which says sumifs have to have a critera, although first thing i tried was sumifs but I get nothing so i am using below formula currently to pull values. Formula is too big for no reason but I'm not sure alternative way of pulling sum based on 6 criteria on a different columns A to F.

=IF(ISERROR(VLOOKUP($C13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)),0,(VLOOKUP($C13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)))+IF(ISERROR(VLOOKUP($D13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)),0,(VLOOKUP($D13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)))+IF(ISERROR(VLOOKUP($E13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)),0,(VLOOKUP($E13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)))+IF(ISERROR(VLOOKUP($F13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)),0,(VLOOKUP($F13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)))+IF(ISERROR(VLOOKUP($G13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)),0,(VLOOKUP($G13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)))+IF(ISERROR(VLOOKUP($H13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)),0,(VLOOKUP($H13,'Production Data Dump'!$AZ$3:$BD$666,4,FALSE)))



<tbody>
</tbody>
appreciate your help.

thanks,
 
Upvote 0
It is hard to catch what this formula have to do. It must sum what? Do I understand you correct that you try to sum quantities from 2nd table, if they match one of 6 possible values of Product#, and some of this values can be empty, yes?
(May be it is because my not so fluent English)
 
Upvote 0
Try this, it seems to work:
PHP:
=SUMPRODUCT(('Production Data Dump'!$AZ$4:$AZ$666=$C13)+('Production Data Dump'!$AZ$4:$AZ$666=$D13)+('Production Data Dump'!$AZ$4:$AZ$666=$E13)+('Production Data Dump'!$AZ$4:$AZ$666=$F13)+('Production Data Dump'!$AZ$4:$AZ$666=$G13)+('Production Data Dump'!$AZ$4:$AZ$666=$H13),'Production Data Dump'!BC$4:BC$666)
 
Upvote 0
yes. it has to sum qty and weight from Production Data Dump. But sumproduct aint working coz its adding criteria which is on column AZ that you mentioned. To get sum, each criteria has to match from the critera in Production Data Dump tab column AZ, then it should add values from column BC and give me a sum.

I hope this makes sense now?
 
Upvote 0
Sumproduct works. Just try my formula.
here is the file (I am new to this forum, may be I can attach, but cannot find how)
Hope formulas will be converted to English version
 
Upvote 0
Try this, it seems to work:
PHP:
=SUMPRODUCT(('Production Data Dump'!$AZ$4:$AZ$666=$C13)+('Production Data Dump'!$AZ$4:$AZ$666=$D13)+('Production Data Dump'!$AZ$4:$AZ$666=$E13)+('Production Data Dump'!$AZ$4:$AZ$666=$F13)+('Production Data Dump'!$AZ$4:$AZ$666=$G13)+('Production Data Dump'!$AZ$4:$AZ$666=$H13),'Production Data Dump'!BC$4:BC$666)

--------------------------------------------

Value is returning as 0 with this formula for whatever reason. I don't know how to attach a spreadsheet here too :(

Again these are the criteria (Column C to column H) - some criteria fields are blank as we don't produce those grades:

Off Grade/B4AAAAAAPrimeOther
51523 5452355523
5452455524
5443155431
543385533852338
5443855438
532125441155411
5434455344553440
5444255442




<colgroup><col><col span="5"></colgroup><tbody>
</tbody>

and this is the data set on the product data dump tab column BL to BP:

Product#"PLUDescriptionSum of #CartonsSum of Net Wt.
541000541000FLANK STEAK387.46
543070543070BNLS BEEF SHOULDER CLOD16468.8
543160543160SHANK BONE-IN15348.71
543200543200KNUCKLE PEELED23681.8
543340543340WHOLE TENDERLOIN11286.73
543350543350ANGUS BNLS BEEF STRIPLOIN21552.5

<colgroup><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>

thanks
 
Upvote 0
There are link in my message to file on cloud. Did you tested it?

sorry didnt realize there was a link.! Yeah it works great. I was specifying range higher than the dataset and since criteria were blank so it was adding the total quantity on each line but I've fixed the dataset range it works great.

You are a genious! :)

Thank you
 
Upvote 0

Forum statistics

Threads
1,215,581
Messages
6,125,657
Members
449,247
Latest member
wingedshoes

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