split up data and total for summary report

t0aster_uk

New Member
Joined
Dec 23, 2004
Messages
6
Hi,

I'm trying to create a summary sheet for some data, here is an example:
Book1
ABCDE
1CustomerQuanity Orderedunit priceTotal cost
2customerA50.231.15
3customerA131.9925.87
4CustomerB243.4983.76
5CustomerB31.253.75
6CustomerB42.510
7CustomerC97.9971.91
Sheet1



what i would like to do is add blank lines between each customer and add a sub total and a total at the end ie:
Book1
ABCDE
1CustomerQuanity Orderedunit priceTotal cost
2customerA50.231.15
3customerA131.9925.87
4subtotal1827.02
5
6CustomerB243.4983.76
7CustomerB31.253.75
8CustomerB42.510
9subtotal3197.51
10
11CustomerC97.9971.91
12subtotal971.91
13
14TOTAL58196.44
Sheet1


Is there an easy-ish way to do this? go gentle on me I'm pretty new to the world of VBA!

Cheers in advance t0aster
 

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
Select Data->Subtotal and Excel will do it automatically for you once you select a few options
 
Upvote 0
Cheers for that!

is there a simple way of calling this from a macro? i'm sorting out the workbook for someone who has even less of a clue than me and it would be nice to hide any scary dialog boxes from them!!

T0aster
 
Upvote 0
Yes it is possible, why don't you record the actions you take to subtotal and see what you get in the recorded macro. This will give you a good start.
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,428
Members
448,896
Latest member
MadMarty

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