Combining row information

JoeA

New Member
Joined
Jun 21, 2005
Messages
16
I have been given a spreadsheet that is a list of members and the committees they will be working on.
There is a column for each committee that has a check mark for each person on that committee but the problem is this. They have created a separate row for each person on each committee so I have several rows for each person, one for each committee column.
Is there an automated way to combine all the rows for each person into a single row and also move the check marks to that new single row.

Any help would be greatly appreciated.
Joe
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
If your data is basically like this, but with more rows & columns.
Code:
[COLOR="RoyalBlue"][B]Row No [/B][/COLOR] [COLOR="RoyalBlue"][B]Col(A)   [/B][/COLOR] [COLOR="RoyalBlue"][B]Col(B) [/B][/COLOR] [COLOR="RoyalBlue"][B]Col(C) [/B][/COLOR] [COLOR="RoyalBlue"][B]Col(D) [/B][/COLOR] [COLOR="RoyalBlue"][B]Col(E) [/B][/COLOR]
1.                comit1  comit2  comit3  comit4 
2.      Member 1  x                              
3.      Member 2                  x              
4.      Member 3          x                      
5.      Member 4                                 
6.      Member 5                          x
Then try this for Results on sheet (2)
Code:
[COLOR="Navy"]Sub[/COLOR] MG07Jun41
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Dim[/COLOR] AcRng [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Dim[/COLOR] ac1 [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Dim[/COLOR] Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("A2"), Range("A" & rows.Count).End(xlUp))
[COLOR="Navy"]Set[/COLOR] AcRng = Range(Range("B1"), Cells(1, Columns.Count).End(xlToLeft))
'[COLOR="Green"][B]Rw = AcRng.Count[/B][/COLOR]
ReDim Ray(1 To Rng.Count + 1, 1 To AcRng.Count + 1)
    [COLOR="Navy"]For[/COLOR] Ac = 1 To AcRng.Count
        Ray(1, Ac + 1) = AcRng(1, Ac)
    [COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]With[/COLOR] CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
    [COLOR="Navy"]If[/COLOR] Not .Exists(Dn.value) [COLOR="Navy"]Then[/COLOR]
        Ray(Dn.row, 1) = Dn
        [COLOR="Navy"]Set[/COLOR] AcRng = Range(Range("B" & Dn.row), Cells(Dn.row, Columns.Count).End(xlToLeft))
            [COLOR="Navy"]For[/COLOR] Ac = 1 To AcRng.Count
                [COLOR="Navy"]If[/COLOR] AcRng(1, Ac) <> "" [COLOR="Navy"]Then[/COLOR] Ray(Dn.row, Ac + 1) = "X": [COLOR="Navy"]Exit[/COLOR] For
            [COLOR="Navy"]Next[/COLOR] Ac
            .Add Dn.value, Dn.row
[COLOR="Navy"]Else[/COLOR]
    [COLOR="Navy"]For[/COLOR] Ac = 1 To AcRng.Count
          [COLOR="Navy"]If[/COLOR] Dn(, Ac + 1) <> "" [COLOR="Navy"]Then[/COLOR] Ray(.Item(Dn.value), Ac + 1) = "X": [COLOR="Navy"]Exit[/COLOR] For
    [COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR]
Sheets("Sheet2").Range("A1").Resize(.Count + 1, AcRng.Count + 1) = Ray
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]With[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,786
Members
452,942
Latest member
VijayNewtoExcel

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