Filtering in one row

qannas

New Member
Joined
Mar 30, 2010
Messages
39
Hello,

i need help in this please

[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]name[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]type[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Jack[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]iphone[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Jack[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]android[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]John[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]iphone[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]John[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]android[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Mousa[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]iphone[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Mousa[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]android[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Jeff[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]android[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Hany[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]iphone[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

















I need to show the outcome like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Jack[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]Iphone, android[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Jeff[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]android[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 81"]
<tbody>[TR]
[TD="width: 81"]Hany [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 107"]
<tbody>[TR]
[TD="width: 107"]iphone[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Thanks.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Code:
Sub quannas()
'assumes starting data begin with a header in A1
' recast data start in D1
Dim Vin As Variant, S As String, c As Range, i As Long
Application.ScreenUpdating = False
Columns("D:E").ClearContents
Range("E1").Value = Range("B1").Value
Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row).AdvancedFilter xlFilterCopy, , Range("D1"), True
Vin = Range("A2:B" & Cells(Rows.Count, "A").End(xlUp).Row).Value
For Each c In Range("D2:D" & Cells(Rows.Count, "D").End(xlUp).Row)
    For i = LBound(Vin, 1) To UBound(Vin, 1)
        If Vin(i, 1) = c.Value Then
            S = S & ", " & Vin(i, 2)
        End If
    Next i
    c.Offset(0, 1).Value = Mid(S, 3)
    S = ""
Next c
Columns("D:E").AutoFit
Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

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