ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Merging duplicate lines in a Database (https://www.excelbanter.com/excel-discussion-misc-queries/211802-merging-duplicate-lines-database.html)

Darren

Merging duplicate lines in a Database
 
I have a rather large database containing column headers as follows

Date Part Number Qty CD Unit Price Cost Total Price

Within this database are dupliacte part number lines, some with different
values.

For example

Date Part Number Qty CD Unit Price Cost Total Price
06/09/1996 0851FJ1 1 FN $3500.00 $3000.00 $3500.00
06/09/1996 0851FJ1 1 FN $2500.00 $2000.00 $2500.00
06/09/1996 10164-2 3 FN $1500.00 $1000.00 $1500.00
06/09/1996 10164-2 4 FN $1450.00 $1200.00 $1450.00

Is there any way I can merge the duplicate lines, keeping the unique part
number, and CD, but combining the quantity and possibly obtaining an average
cost and price of the parts?

Example:

Date Part Number Qty CD Unit Price Cost Total Price
06/09/1996 0851FJ1 2 FN $3000.00 $2500.00 $3000.00
06/09/1996 10164-2 7 FN $1475.00 $1100.00 $1475.00

Any help/advice anyone out there can provide would be greatly appreciated.


Eduardo

Merging duplicate lines in a Database
 
Hi Darren,
Do a Pivot table, then you change your unit price, cost and total in the
setting field to average and you will get the results you are looking for
If the answer helped you please rate it
"Darren" wrote:

I have a rather large database containing column headers as follows

Date Part Number Qty CD Unit Price Cost Total Price

Within this database are dupliacte part number lines, some with different
values.

For example

Date Part Number Qty CD Unit Price Cost Total Price
06/09/1996 0851FJ1 1 FN $3500.00 $3000.00 $3500.00
06/09/1996 0851FJ1 1 FN $2500.00 $2000.00 $2500.00
06/09/1996 10164-2 3 FN $1500.00 $1000.00 $1500.00
06/09/1996 10164-2 4 FN $1450.00 $1200.00 $1450.00

Is there any way I can merge the duplicate lines, keeping the unique part
number, and CD, but combining the quantity and possibly obtaining an average
cost and price of the parts?

Example:

Date Part Number Qty CD Unit Price Cost Total Price
06/09/1996 0851FJ1 2 FN $3000.00 $2500.00 $3000.00
06/09/1996 10164-2 7 FN $1475.00 $1100.00 $1475.00

Any help/advice anyone out there can provide would be greatly appreciated.



All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com