Duplicates with different data to combine with VBA

chipsworld

Board Regular
Joined
May 23, 2019
Messages
164
Office Version
  1. 365
Hello all,
Once again, I find myself seeking help... (Glad this forum is here!!!)

I have a spreadsheet with 21 columns with various data.

Column 1 is a part number, column 3 is a product type and column 6 is a date range

The problem is this...there can be anywhere from 2 to 7 lines with the same part number and each row with that part number can have different date ranges.

I am looking for a way to use the part number as the common string and combine the data in column 6 into a single entry:

ie. If I had three lines with the same part number, but the date ranges in each row were different, how can I concatenate them into one cell.

The spreadsheet has around 5000 rows of data with a LARGE amount of repeated part numbers, and I receive a new sheet each week that needs to be "blended" into the master.

I don't want anyone to do it for me, I would just like pointers on how to proceed. I honestly can't even figure out where to start.

I am guessing that it will incorporate some type of concatenate or textjoin or ??

Thanks for any tips on how to approach this.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi chipsworld,

Using Dictionary object would be helpful in your situation which will allow you to get the unique part numbers then just add the date ranges to each part number then paste the results in a new tab. If you need further assistance with the code, I would be happy to help.
 
Upvote 0
mse330...I am new to the Dictionary object, so am gonna try to figure this thing out, but...be prepared for questions! LOL

Thanks for the guidance. Let's see if I can figure it out.
 
Upvote 0

Forum statistics

Threads
1,223,787
Messages
6,174,561
Members
452,573
Latest member
Cpiet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top