Summary - Variable Ranges

Lindsay0385

New Member
Joined
Dec 21, 2016
Messages
30
Hi - I probably didn't title this right, but I'm not sure how to explain this. I'm working on a spreadsheet similar to this (this is a very basic example), with a summary at the bottom for all items:

Year 1Year 2Year 3
Item 1
Sales$20,000$30,000$40,000
Units1,0001,5002,000
Item 2
Sales$20,000$30,000$40,000
Units1,0001,5002,000
Item 3
Sales$20,000$30,000$40,000
Units1,0001,5002,000
.
.
.
Summary
Sales$60,000$90,000$120,000
Units3,0004,5006,000

<tbody>
</tbody>

What I need help with is that when someone uses the spreadsheet there could be 1 item or 20 items, each time it will be different (signified by the "..." above).

The spreadsheet starts with 1 item and the person using it presses a button to run a macro to add additional items until they've added enough for how many items they need and then they fill out the values for each items. Is it possible to build the summary to account for this?

I was just going to leave a blank summary at the bottom and the person filling out the form would have to sum up everything manually, but I figured I would check here first to see if anyone has come across a situation like this.

Thanks,
Lindsay
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You should be able to use a formula like
=SUMIF(A2:A11,"Sales",B2:B11) and
=SUMIF(A2:A11,"Units",B2:B11)

When the new rows are inserted the formula should account for it.
 
Upvote 0
Solution
You should be able to use a formula like
=SUMIF(A2:A11,"Sales",B2:B11) and
=SUMIF(A2:A11,"Units",B2:B11)

When the new rows are inserted the formula should account for it.

Awesome! I had no idea it would be that easy! Thanks so much!
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

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