ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Subtotals macro (https://www.excelbanter.com/excel-programming/339735-subtotals-macro.html)

Sami82[_2_]

Subtotals macro
 

Hi All,

Ok, I have users type in the data in a form and it fills in the report
(attached) like so:

code value gst value
prod1 $1,000.00 $100.00 $1,100.00
prod1 $1,000.00 $100.00 $1,100.00
prod2 $1,000.00 $100.00 $1,100.00
prod3 $1,000.00 $100.00 $1,100.00

I want it to separate the different products (after the form has been
completed) making a subtotal line and then following a blank one after,
such as:

code value gst value
prod1 $1,000.00 $100.00 $1,100.00
prod1 $1,000.00 $100.00 $1,100.00
$2,000.00 $200.00 $2,100.00

prod2 $1,000.00 $100.00 $1,100.00
$1,000.00 $100.00 $1,100.00

prod3 $1,000.00 $100.00 $1,100.00
$1,000.00 $100.00 $1,100.00

The only problem is that the amount of entries for a product will
always change so i cant put static formulas in. Please see my example
attachment for further understanding.

Thank you :)
Sam


+-------------------------------------------------------------------+
|Filename: summary total macro.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3804 |
+-------------------------------------------------------------------+

--
Sami82
------------------------------------------------------------------------
Sami82's Profile: http://www.excelforum.com/member.php...o&userid=27111
View this thread: http://www.excelforum.com/showthread...hreadid=466611


Gary Keramidas[_2_]

Subtotals macro
 
the easiest way is to select all of the columns, click data/subtotals and
select at each change is code and select sum of the columns you want
you can record a macro while you do this, too.


--


Gary


"Sami82" wrote in
message ...

Hi All,

Ok, I have users type in the data in a form and it fills in the report
(attached) like so:

code value gst value
prod1 $1,000.00 $100.00 $1,100.00
prod1 $1,000.00 $100.00 $1,100.00
prod2 $1,000.00 $100.00 $1,100.00
prod3 $1,000.00 $100.00 $1,100.00

I want it to separate the different products (after the form has been
completed) making a subtotal line and then following a blank one after,
such as:

code value gst value
prod1 $1,000.00 $100.00 $1,100.00
prod1 $1,000.00 $100.00 $1,100.00
$2,000.00 $200.00 $2,100.00

prod2 $1,000.00 $100.00 $1,100.00
$1,000.00 $100.00 $1,100.00

prod3 $1,000.00 $100.00 $1,100.00
$1,000.00 $100.00 $1,100.00

The only problem is that the amount of entries for a product will
always change so i cant put static formulas in. Please see my example
attachment for further understanding.

Thank you :)
Sam


+-------------------------------------------------------------------+
|Filename: summary total macro.zip |
|Download: http://www.excelforum.com/attachment.php?postid=3804 |
+-------------------------------------------------------------------+

--
Sami82
------------------------------------------------------------------------
Sami82's Profile:
http://www.excelforum.com/member.php...o&userid=27111
View this thread: http://www.excelforum.com/showthread...hreadid=466611




Sami82[_4_]

Subtotals macro
 

Worked a charm!

Just wondering if it is possible to set the format to leave a space
below the subtotal and draw boarders?

Thanks

Gary Keramidas Wrote:
the easiest way is to select all of the columns, click data/subtotals
and
select at each change is code and select sum of the columns you want
you can record a macro while you do this, too.


--


Gary



--
Sami82
------------------------------------------------------------------------
Sami82's Profile: http://www.excelforum.com/member.php...o&userid=27111
View this thread: http://www.excelforum.com/showthread...hreadid=466611



All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com