Running Cume

Gordon1963

New Member
Joined
Oct 18, 2017
Messages
17
Store# Zip Sales
2 17331 $16,799
2 17332 $15,800
2 17365 $16,000
4 19124 $13,000
4 19127 $14,100
5 24567 $12,000
5 24580 $11,000
5 24550 $9,000
5 24555 $8,000

The above is my data. I need a formula or macro to take the information by store as follows:
Cume
2 17331 $16,799 $16,799
2 17332 $15,800 $32,599 (This is above# + $15,800)
2 17365 $16,000 $48,599 (This is above# total + 16,000)

Once I have the cume, I need to know what percent of each store is a pert of total sales for store #. In this case #2
Cume
2 17331 $16,799 $16,799 35% ($16,799/$48,599)
2 17332 $15,800 $32,599 67% ($32,599/$48,599)
2 17365 $16,000 $48,599


This would be done with each store#. My problem, is if I do a macro, the number of stores different and there is not a uniformed #. As you can see there are 4 #2 stores, 2 #4 stores and 4 #5 stores. How do I get the above results?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi, the Cumulative total is straightforward . . .

Assuming your data is in the range A2:C10, with header details on row 1 . . .

In D2
=if(A2=A1,D1+C2,C2)

and copy all the way down.

For your percentage, I can think of various ways of doing this with a helper column - is that an option for you ?
 
Upvote 0
Gerald thanks! I thought about doing it your way with the formula, but that would not be the solution, so I decided to do a Pivot Table so I can see each store sales by zip codes.
 
Upvote 0

Forum statistics

Threads
1,216,036
Messages
6,128,432
Members
449,452
Latest member
Chris87

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