Delete Duplicate Rows, Summing the Qty

  • Thread starter Thread starter Shirley T
  • Start date Start date
S

Shirley T

Hi all,

I'm trying to look for a solution for the following: Without using pivot table.

Before :
DC664AV 5
DC664AV 6
DC970AV 4
DK560AV 34



After macro applied:
DC664AV 11
DC970AV 4
DK560AV 34

Greatly appeariate if u can help.
Thanks!

Shirley T
 
Data=> Subtotals, group on your first column and sum on the second. Use the
outline feature to collapse the rows so only the totals are shown.
 
Hi Ogilvy,
thanks for the answer, however, Data=> Subtotals wasn't the desire
method that i prefer. I'm the begining learning for VBA, And I really
want to see if writing a macro script to bring up my answer.

The Data=> Subtotals way is good, but i still have to manual remove
the word "total" and, manual copy the result to another sheet.

may u help?
Show me a way if u can! Millions thanks!

ST
 
Try recording a macro when:
you do the Data|Subtotals
collapse the outline to just show the subtotals
Edit|goto|special|visible cells only
select the range
copy the visible cells
paste to a new sheet
edit|replace " total" with ""
(Format as desired)
stop recording

Then look at the code that was generated.
 
As Dave indicated - if you are using VBA, you don't have to do anything
manually - it is always best to capitalize on the builtin capabilities of
Excel.
 
Back
Top