sumifs formula works in one column but only gives zero value in the next column

rbziegler

New Member
Joined
Feb 4, 2016
Messages
7
Hello all, thank you for taking a look at this. I am using Excel for Mac 2011, OS X Yosemite.

I am setting up a sales tracking database for my bakery. The data is entered daily, and I am building weekly and monthly summary sheets. Each product (e.g. Chocolate Chip Cookie) is a row. Each column is the number of products that were sold at a certain price on a certain day.

I am using =SUMIFS to look over each row and tell me how many cookies were made during a given date range AND at what price they were sold. We sell products at full price, then reduced price, then they are given free to employees. We track the product based on the day it was baked -- meaning cookies that are baked on Monday will be reduced on Tuesday and given away free on Thursday -- but they are always "Monday's cookies".

The problem I am having is this... My SUMIFS formula works GREAT in my first column, which is the column tracking the total number of cookies that were made. I was very excited to have gotten it figured out. But when I went to use the same formula in the next column, to track the reduced price cookies, it will only return a zero value.

By changing only the criteria 1 (from "Redu" to "Made") the formula again calculates the correct answer. So I know it must be an issue with criteria. But I cannot figure out what the issue is. I have searched the webs and this forum for several hours and cannot find any leads on this problem.

I'm having trouble posting the table to this thread, but here are two examples of the formulas I'm using, the first example is the column that is working great, the second example is the column that is returning the zero value.

=SUMIFS('Pastry DAILY'!$B5:$AC5,'Pastry DAILY'!$B$3:$AC$3,"Made",'Pastry DAILY'!$B$1:$AC$1,">="&$B$2,'Pastry DAILY'!$B$1:$AC$1,"<="&$D$2)


So "Pastry Daily" is the sheet where the daily numbers are stored, the sum range is the row containing all of the possible counts, the first criteria range contains the row that describes whether the count is Made, Reduced, or Free. The first criteria I have tried as a cell reference or text string, both work fine. The second and third criteria and ranges are to look at only certain dates, again those do not seem to be a problem.

So here is the formula in the next column that is returning a zero value. As you'll see, they are identical except for the first criteria.


=SUMIFS('Pastry DAILY'!$B5:$AC5,'Pastry DAILY'!$B$3:$AC$3,"Redu",'Pastry DAILY'!$B$1:$AC$1,">="&$B$2,'Pastry DAILY'!$B$1:$AC$1,"<="&$D$2)

It should be returning a value of 27, based on the data in the daily sheets.

I have checked the spelling of "Redu" and it is identical on both sheets -- there are no leading or trailing spaces.

Sorry I have not posted a sample table, but after reading the FAQ, I was still unable to figure out how to do it from a Mac.
Again thank you for taking the time to look at this, and for any help you can offer.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I think we need a sample file.

Attach a sample spreadsheet with expected results, remove any sensitive data.
You cant attach files on this forum.
Upload the file to an online storage site then place a link to it on this forum.
 
Upvote 0
SUMIFS conditions all need to be true so they should be regarded as ANDs, ie
If condition1 is true AND condition2 is true etc.

If you need an OR type statement in there it's better to replace the SUMIFS with SUMPRODUCT
 
Upvote 0
1.

=SUMIFS('Pastry DAILY'!$B5:$AC5,'Pastry DAILY'!$B$3:$AC$3,"Made",'Pastry DAILY'!$B$1:$AC$1,">="&$B$2,'Pastry DAILY'!$B$1:$AC$1,"<="&$D$2)

2.

=SUMIFS('Pastry DAILY'!$B5:$AC5,'Pastry DAILY'!$B$3:$AC$3,"Redu",'Pastry DAILY'!$B$1:$AC$1,">="&$B$2,'Pastry DAILY'!$B$1:$AC$1,"<="&$D$2)

Since 1 and 2 differ only in the criterion which must hold for 'Pastry DAILY'!$B$3:$AC$3, the conclusion imposes itself that no occuurence of redu is concurrent with other criteria or the corresponding sum range is zero.

What does...

=COUNTIFS('Pastry DAILY'!$B$3:$AC$3,"Redu")

yield?
 
Upvote 0
Just for testing purposes

Try
=SUMIFS('Pastry DAILY'!$B5:$AC5,'Pastry DAILY'!$B$3:$AC$3,"Redu")

=SUMIFS('Pastry DAILY'!$B5:$AC5,'Pastry DAILY'!$B$3:$AC$3,
"*Redu*")

Tell us the results

M.


 
Upvote 0
Thanks, here is a link to the file. You can see on the pastry weekly sheet that column B (Made) is all working correctly. Column C (Full) is just subtracting the cookies that were Reduced (column C) from the Made.
In regards to the conditions, I believe I do want AND instead of OR type statement, because I want only the given date range AND the given price category. Thanks for your time!

https://www.dropbox.com/s/hqu309lc2wfhg1b/Sales Tracking Beta.xlsx?dl=0
 
Upvote 0
Please try to answer the questions in posts #4 and #5
Test the formulas.

M.
 
Upvote 0
=SUMIFS('Pastry DAILY'!$B5:$AC5,'Pastry DAILY'!$B$3:$AC$3,"Redu")

Yielded the desired result of 27....
 
Upvote 0
So is it a problem with the dates in the criteria range, the formula doesn't like the merged cells, something like that?
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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