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!
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Fruit Bought[/TD]
[TD]Day 1[/TD]
[TD]Day 2[/TD]
[TD]Day 3[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Apples[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Oranges[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Sally[/TD]
[TD]Apples[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Sally[/TD]
[TD]Oranges[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Apples[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Oranges[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
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!
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Fruit Bought[/TD]
[TD]Day 1[/TD]
[TD]Day 2[/TD]
[TD]Day 3[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Apples[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Oranges[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Sally[/TD]
[TD]Apples[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Sally[/TD]
[TD]Oranges[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Apples[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Oranges[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]