asugianto
04-06-2005, 05:11 PM
Here is the sample of my excel data:
BETTY 20 HEW A 22
BETTY 20 HEW B 0
BETTY 20 HEW C 1
BETTY 20 HEW D 7
BETTY 20 HEW E 10
BETTY 20 HEW F 64
BETTY 20 HEW G 4
BETTY 23 THOMAS A 0
BETTY 23 THOMAS B 0
BETTY 23 THOMAS C 0
BETTY 23 THOMAS D 0
BETTY 23 THOMAS E 0
BETTY 23 THOMAS F 0
BETTY 23 THOMAS G 0
I would like to have a macro that automatically add rows for every data change in column 3 and add subtotals for column 5. Final data will look like this:
BETTY 20 HEW A 22
BETTY 20 HEW B 0
BETTY 20 HEW C 1
BETTY 20 HEW D 7
BETTY 20 HEW E 10
BETTY 20 HEW F 64
BETTY 20 HEW G 4
Subtotal 108
BETTY 23 THOMAS A 0
BETTY 23 THOMAS B 0
BETTY 23 THOMAS C 0
BETTY 23 THOMAS D 0
BETTY 23 THOMAS E 0
BETTY 23 THOMAS F 0
BETTY 23 THOMAS G 0
Subtotal 0
Thank you!
Alvin :hi:
BETTY 20 HEW A 22
BETTY 20 HEW B 0
BETTY 20 HEW C 1
BETTY 20 HEW D 7
BETTY 20 HEW E 10
BETTY 20 HEW F 64
BETTY 20 HEW G 4
BETTY 23 THOMAS A 0
BETTY 23 THOMAS B 0
BETTY 23 THOMAS C 0
BETTY 23 THOMAS D 0
BETTY 23 THOMAS E 0
BETTY 23 THOMAS F 0
BETTY 23 THOMAS G 0
I would like to have a macro that automatically add rows for every data change in column 3 and add subtotals for column 5. Final data will look like this:
BETTY 20 HEW A 22
BETTY 20 HEW B 0
BETTY 20 HEW C 1
BETTY 20 HEW D 7
BETTY 20 HEW E 10
BETTY 20 HEW F 64
BETTY 20 HEW G 4
Subtotal 108
BETTY 23 THOMAS A 0
BETTY 23 THOMAS B 0
BETTY 23 THOMAS C 0
BETTY 23 THOMAS D 0
BETTY 23 THOMAS E 0
BETTY 23 THOMAS F 0
BETTY 23 THOMAS G 0
Subtotal 0
Thank you!
Alvin :hi: