Subgroup from the Main Group of Data Consolidate

L

Len

Hi,

Is there vba codes that can help to create a subgroup with subtotal
from the main group of text string in column A after running excel
function of "Data Consolidate" under a workbook which has about 3000
rows with 15 columns, thereafter recalculate the subtotal for the main
group ( ie to deduct the subtotal of subgroup otherwise it will be
double counting )

E.g.
Before
ColA B
C D E F G------>O
Row1-7 group John <blank> 7 1
4 6 10
Row8-15 group Smith - MBA <blank> 20 5 57 0
120
Row16-30 group Smith -LAW <blank> 1 2 3
4 5
Row31-40 group Smith-Others <blank> 2 4 6
8 12
Row41-45 group Peter <blank> 3 6
9 13 26
Row 46 Subtotal 33
18 79 31 173


After
ColA B
C D E F G------>O
Row1-7 group John <blank> 7 1
4 6 10
Row8-15 group Smith - MBA <blank> 20 5 57 0
120
Row16-30 group Smith -LAW <blank> 1 2 3 4
5
Row31-40 group Smith-Others <blank> 2 4 6 8
12
Row8-40 Subgroup Smith 23 11 66
12 137
Row41-45 group Peter <blank> 3 6 9
13 26
Row 46 Subtotal 33
18 79 31 173


Any helps will be much appreciated and thanks in advance

Regards
Len
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top