SUMIFs Formula Ranges Question

Angelfish13

New Member
Joined
Jan 25, 2017
Messages
14
Hi,

I have a table like below. I have a formula in another sheet that lets me know how many apples Bob bought on day 1 - it works great:

=SUMIFS(Sheet2!C:C,Sheet2!A:A,"Bob",Sheet2!B:B,"Apples")

BUT I need excel to sum the "month to date" as well to see how many apples Bob has bought so far this month....for instance finding the total for days columns 3-5. So I tried this:

=SUMIFS(Sheet2!C:E,Sheet2!A:A,"Bob",Sheet2!B:B,"Apples")

Now it returns a #VALUE ! error I think because there is a rule that the lookup formulas and ranges have to be the same size. Now I'm stumped. Are there any ways around this?

Follow-up question, not to complicate things.....but is there any way to make the summing of days "dynamic?" For instance, I need to run this report everyday to get the month to date (runs through day before). On Day 4, there will be three columns. But on day 26, there will be 25 columns. Do I have to change the formula every day to make the number of columns size right?


Please let me know, thanks so much for your help!
NameFruit BoughtDay 1Day 2Day 3
BobApples423
BobOranges234
SallyApples212
SallyOranges113
PeterApples335
PeterOranges222

<tbody>
</tbody>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
SUMIFS cannot sum a multicolumn range.

Try rather: Control+shift+enter, not just enter...

=SUM(IF(Sheet2!A2:A4000="Bob",IF(Sheet2!B2:B4000="Apples",Sheet2!C2:E4000)))
 
Upvote 0
Insert a new column C in Sheet2 so your day1 data starts from D

C2 is =A2&B2 and drag down

This concatenates your two conditions into a unique value. (You can hide this column)

On your other sheet assuming A2 is Bob and B2 is Apples

=SUMIF(Sheet2!C:C,A2&B2,Sheet2!D:AH)

Please note AH would be day 31. As long as future days are not populated, this would work.
 
Upvote 0
Hi everyone,

I was finally able to figure this out! Thank you so much for the responses - you have saved me countless hours of work. I really appreciate your help! :)
 
Upvote 0

Forum statistics

Threads
1,221,469
Messages
6,160,028
Members
451,611
Latest member
PattiButche

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