Filtering in one row

qannas

New Member
Joined
Mar 30, 2010
Messages
39
Hello,

i need help in this please

name

<tbody>
</tbody>
type

<tbody>
</tbody>
Jack

<tbody>
</tbody>
iphone

<tbody>
</tbody>
Jack

<tbody>
</tbody>
android

<tbody>
</tbody>
John

<tbody>
</tbody>
iphone

<tbody>
</tbody>
John

<tbody>
</tbody>
android

<tbody>
</tbody>
Mousa

<tbody>
</tbody>
iphone

<tbody>
</tbody>
Mousa

<tbody>
</tbody>
android

<tbody>
</tbody>
Jeff

<tbody>
</tbody>
android

<tbody>
</tbody>
Hany

<tbody>
</tbody>
iphone

<tbody>
</tbody>

<tbody>
</tbody>

















I need to show the outcome like this:

Jack

<tbody>
</tbody>
Iphone, android

<tbody>
</tbody>
Jeff

<tbody>
</tbody>
android

<tbody>
</tbody>
Hany

<tbody>
</tbody>
iphone

<tbody>
</tbody>

<tbody>
</tbody>

Thanks.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,214,430
Messages
6,119,443
Members
448,898
Latest member
drewmorgan128

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