Combining Rows & deleting duplicates based on column values

Gidget04060

New Member
Joined
Oct 1, 2017
Messages
1
Good Evening,

I have an excel export containing columns A through R.

What I need is a macro that will run through to last row of data and merge rows based on like values in certain columns.

For example:
If Column A,B,C & F match then merge rows. However, some columns may have information that do not match and would like the values to separated by comma in the merged row.

Starting data:
[TABLE="width: 1388"]
<colgroup><col span="3"><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Actual Start Date[/TD]
[TD]Planned End Date[/TD]
[TD]Stage Status[/TD]
[TD]Stage Actual Start Date[/TD]
[TD]Stage Planned End Date[/TD]
[TD]Stage On Time Status[/TD]
[TD]Assigned To (Role)[/TD]
[TD]Assigned To (Contact)[/TD]
[/TR]
[TR]
[TD]09/08/2017 08:57[/TD]
[TD]07/11/2017 10:31[/TD]
[TD]Not Started[/TD]
[TD] [/TD]
[TD]07/11/2017 10:31[/TD]
[TD]Pending[/TD]
[TD]Project Manager[/TD]
[TD]Email Eaxmple 1[/TD]
[/TR]
[TR]
[TD]09/08/2017 08:57[/TD]
[TD]07/11/2017 10:31[/TD]
[TD]In Progress[/TD]
[TD]09/08/2017 08:57[/TD]
[TD]07/11/2017 10:31[/TD]
[TD]Late[/TD]
[TD]External Approvers[/TD]
[TD]Email Example 2[/TD]
[/TR]
[TR]
[TD]09/08/2017 08:57[/TD]
[TD]07/11/2017 10:31[/TD]
[TD]In Progress[/TD]
[TD]09/08/2017 08:57[/TD]
[TD]07/11/2017 10:31[/TD]
[TD]Late[/TD]
[TD]External Approvers[/TD]
[TD]Email Example 3[/TD]
[/TR]
</tbody>[/TABLE]

Result:
[TABLE="width: 1522"]
<colgroup><col span="3"><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Actual Start Date[/TD]
[TD]Planned End Date[/TD]
[TD]Stage Status[/TD]
[TD]Stage Actual Start Date[/TD]
[TD]Stage Planned End Date[/TD]
[TD]Stage On Time Status[/TD]
[TD]Assigned To (Role)[/TD]
[TD]Assigned To (Contact)[/TD]
[/TR]
[TR]
[TD]09/08/2017 08:57[/TD]
[TD]07/11/2017 10:31[/TD]
[TD]Not Started, In Progress[/TD]
[TD] 09/08/2017 08:57[/TD]
[TD]07/11/2017 10:31[/TD]
[TD]Pending, Late[/TD]
[TD]Project Manager, External Approvers[/TD]
[TD]Email Eaxmple 1, Email Example 2, Email Example 3[/TD]
[/TR]
</tbody>[/TABLE]

Any help would be so appreciated.

Thank you in advance!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Re: Help with Combining Rows & deleting duplicates based on column values

Welcome to the MrExcel board!

It isn't entirely clear to me. You said to merge them if A, B, C and F matched, but then your example merged a row where that was not the case.
So how do we tell which rows to merge and which rows not to merge?
 
Upvote 0
If I understand this correctly, you want remove identical items (starting date), but also concatenate all items (in one cell) for that one specific item. However, I can provide you only with a non-macro solution.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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