View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
hon123456 hon123456 is offline
external usenet poster
 
Posts: 31
Default How to sum subtotal with blank line

Dear all,

I have excel data as follows:


NO Pieces
--------- ----------
A001 10 pc
[blank line]
A001 20 pc
[blank line]
A001 30 pc
[blank line]
A002 15 pc
[blank line]
A002 15 pc


Now I want to write a VBA to sum a subtotal for the
column
of A001 and A002, the outcomes
should as follows:


NO Pieces Subtotal
--------- ---------- ------------
A001 10 pc
[blank line]
A001 20 pc
[blank line]
A001 30 pc 60pc
[blank line]
A002 15 pc
[blank line]
A002 15 pc 30pc


How can I do that in Excel with VBA or other method ?


Thanks.