VBA FOR SUBTOTAL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

THIS MY DATA
EMP. NO. NAME NOS
3120 MICHAEL 530
3120 MICHAEL 550
4987 PAUL 700
4987 PAUL 685
5033 ANTHONY 300
5033 ANTHONY 90

I WANT ABOVE DATA IN SHEET2 TO BE LIKE

EMP. NO. NAME NOS
3120 Total MICHAEL 1080
4987 Total PAUL 1385
5033 Total ANTHONY 390
Grand Total 2855
THERE IS ANY VBA CODE TO MAKE IT AUTOMATICALLY.
PLEASE HELP
THANKS
 
Hi,

You don't need VBA. Select your range including headings and then

data|subtotals
Ensure sum and the column to sum are selected and click OK.
If you want to apply this using VB then record yourself doing it.

Mike
 

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

Back
Top