Forum

Macro for adding Su...
 
Notifications
Clear all

Macro for adding Sub total

4 Posts
2 Users
0 Reactions
99 Views
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Each month we have many Statements of Account need send to Customers for payment, and how to use a Macro to auto insert a Sub-total base on 

Due Date column, also  add remark " Sub-total"  in the rows, sample file per attach, appreicate your help.  

 
Posted : 26/07/2019 11:44 pm
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Any hints?

 
Posted : 29/07/2019 10:38 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi David,

Normally, a macro is needed after evaluating if the result cannot be achieved with excel's default tools. This is not the case, your data structure is not a new one never seen before, can be done with a simple pivot table.

The pivot table can be configured as you need, with subtotal, grand totals and so on.

To replicate in vba what a pivot table does, it's a hard work for nothing, takes a lot of time to do what a pivot does in seconds, and the result is not as reliable as a pivot solution.

See attached file, you can play around and modify the design as needed.

 
Posted : 30/07/2019 12:16 am
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Thanks got it !

 
Posted : 30/07/2019 1:12 am
Share: