Grouping rows based on common values

jfd456

New Member
Joined
Jun 6, 2012
Messages
5
Hello :)

I have stuggled with this one for ages. I'm just past beginner stage of VBA, and I can't find anything in the manuals or online. Here is my question :

I have a sheet like this, with one row per client, with codes and dates :

[TABLE="class: grid, width: 500, align: left"]
<TBODY>[TR]
[TD]Client
[/TD]
[TD]Code1
[/TD]
[TD]Code2
[/TD]
[TD]Code3
[/TD]
[TD]Code4
[/TD]
[TD]Date
[/TD]
[/TR]
[TR]
[TD]24435
[/TD]
[TD]X2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]22/03/2012
[/TD]
[/TR]
[TR]
[TD]24436
[/TD]
[TD]D9
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]05/03/2012
[/TD]
[/TR]
[TR]
[TD]21546
[/TD]
[TD]S3
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23/04/2012
[/TD]
[/TR]
[TR]
[TD]21546
[/TD]
[TD]E1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23/04/2012
[/TD]
[/TR]
[TR]
[TD]21546
[/TD]
[TD]Z5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]23/04/2012
[/TD]
[/TR]
[TR]
[TD]21546
[/TD]
[TD]Q1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]02/06/2012
[/TD]
[/TR]
[TR]
[TD]24387
[/TD]
[TD]S1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]01/05/2012
[/TD]
[/TR]
</TBODY>[/TABLE]













I am trying to get the "Code" values in one row, where the there are duplicate values on both Client and Date, so it would look like this :

[TABLE="class: grid, width: 500, align: left"]
<TBODY>[TR]
[TD]Client
[/TD]
[TD]Code1
[/TD]
[TD]Code2
[/TD]
[TD]Code3
[/TD]
[TD]Code4
[/TD]
[TD]Date
[/TD]
[/TR]
[TR]
[TD]24435
[/TD]
[TD]X2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]22/03/2012
[/TD]
[/TR]
[TR]
[TD]24436
[/TD]
[TD]D9
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]05/03/2012
[/TD]
[/TR]
[TR]
[TD]21546
[/TD]
[TD]S3
[/TD]
[TD]E1
[/TD]
[TD]Z5
[/TD]
[TD][/TD]
[TD]23/04/2012
[/TD]
[/TR]
[TR]
[TD]21546
[/TD]
[TD]Q1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]02/06/2012
[/TD]
[/TR]
[TR]
[TD]24387
[/TD]
[TD]S1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]01/05/2012
[/TD]
[/TR]
</TBODY>[/TABLE]











There are very large amounts of data, and a downstream process relies on having the data in the grouped format.

Any help is much appreciated!

Thanks

Jim
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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