Combining duplicate records(rows)

J

Jen

I'm pulling sales per item, but sometimes the item number shows up twice with
two different sales numbers and I want to add the two sales numbers together
and have that total sales under the one item number. Any ideas?
 
K

Ken Wright

Pivot table perhaps, or sort your data on item number and then use data /
subtotals.
 
J

Jen

Isn't there a way to have excel analyze the data and combine the rows into
one row when the item number is the same and then adding the sales number in
both rows together?
 
K

Ken Wright

Yes, via a Pivot table or Data / Subtotals. Use either one to get what you
want and then if you really want to lose the detail data, just copy and
paste special the table as values. Then delete the detail data.

Failing that you need to use VBA to do what you want, though it would
probably be quickest to have the VBA use a pivot table or data Subtotals and
then give you a hardcoded output table and deleting the detail.

A pivot table giving you what you want can probably be created from your
data in literally 60 seconds - Likewise Data / Subtotals

Pivot table intro
http://peltiertech.com/Excel/Pivots/pivotstart.htm

Data / Subtotals:-
Sort all your data on the item number, select all the data, do Data /
Subtotals - At each change in 'Iten Number', Sum - Tick all the fields you
want to sum.
 

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