Excel/Merging duplicate cells
I am trying to collapse duplicates into single cells, like this two column example:
With the end result:
IN12345678 ABC, XYZ
Is there an easy way to do this?
Not sure if its an easy way, but try this--
First separate the values using text to columns. you should end up with the 10 place number in one cell and the related second part of the number in the next column on the same row.
IN12345678 ABC in column A will end up as.
Column B IN12345678
column C ABC
Sort the data on bolumn B so that the column B values are all grouped.
now create a formula in column D (same row, row 1) like this
In the next column column E (same row), create a formula like this
In the next column, column F (same row), create a formula like this
This takes care of a four duplicate number if you will have more then continue on in columns to the right until you have created formulas to take care of all of the duplicates.
Then use a combining formula to combine the values in each of the columns something like this--
The result of the combining formula will look something like this
These formulas will all copy down and with the relative referencing will change appropriately.
You will now end up with one row which has all of the duplicates combined in a formula the other duplicate rows will not have all of the duplicates reflected.
I suggest that you copy and paste special/value, your results, then sor the results in reverse column order which will break out the matches you need.
Hope this helps