Macro to merge rows in one column based on value in another column that has been sorted

sewed

New Member
Joined
Jul 15, 2014
Messages
17
I'm trying to enhance another macro i have that will go through several steps to resort rows. I now want vba code to add a column that merges all the rows associated with values that have been sorted in another column.

Below is an example of the current data structure looks like (not real data) and what i would like it to look like including formatting (see hyperlink).

Thanks in advance.


Current
#CODEIISEQLINE NumberDirectionsStartFinish
1Red1163301AB8/1/20139/1/2014
2Red1163302ABC8/1/20139/1/2014
3Blue1163303AB8/1/20139/1/2014
4Orange1163304ABCDE8/1/20139/1/2014
5Yellow1141031ABC8/1/20139/1/2014
6Yellow1141032AB8/1/20139/1/2014
7Red1141033ABCDE1/1/20143/1/2014
8Purple1141034ABCDE8/1/20139/1/2014
9Blue1141035ABC8/1/20139/1/2014
10Blue11286813ABZBC8/1/20139/1/2014
11Yellow11286823ABZBC8/1/20139/1/2014
12Orange1128683ABC8/1/20139/1/2014
13Red1128684ABC1/1/20143/1/2014
14Green1128685ABC1/1/20143/1/2014
15Green1159811AB1/1/20143/1/2014
16Green1159812AB1/1/20143/1/2014
17Blue1159813ABC8/1/20133/2/2014
18Yellow1159814AB8/1/20133/2/2014
19Orange1159815ABCDE8/1/20133/2/2014

<tbody>
</tbody>


Here is what i would like it to look like: https://www.dropbox.com/s/xc0kkj4meptbci8/vba.png?dl=0

<tbody>
</tbody>
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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