• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Vertically data into horizontally of repeated numbers

adeel1

Member
hello

PFA, i want, there are repeated numbers in column "A" and in column "C" the services are different.pl make all services name in front of number horizontally means repeated numbers turn into single and all services name of column c become to horizontally in front of number.
 

Attachments

  • VAS.xls
    99.5 KB · Views: 8
sorry sir
i did not need like this, i have uploaded file for your better understanding, i need result like in sheet 2..

Adeel
 

Attachments

  • 4545.xlsx
    26.9 KB · Views: 9
Try this !​
Code:
Sub Demo()
        Application.ScreenUpdating = False
        Sheet2.UsedRange.Clear
With CreateObject("Scripting.Dictionary")
    VA = Sheet1.UsedRange.Value
For R& = 1 To UBound(VA)
    .Item(VA(R, 1)) = .Item(VA(R, 1)) & vbTab & VA(R, 2)
Next
    Sheet2.[A1].Resize(.Count).Value = Application.Transpose(.Keys)
    VT = .Items
    .RemoveAll
For R = 1 To UBound(VT) + 1
        VA = Split(VT(R - 1), vbTab)
    For C& = 1 To UBound(VA)
        If Not .Exists(VA(C)) Then .Add VA(C), .Count + 2
        Sheet2.Cells(R, .Item(VA(C))).Value = VA(C)
    Next
Next
    .RemoveAll
End With
        Sheet2.UsedRange.Columns.AutoFit
        Application.Goto Sheet2.Cells(1), True
        Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Back
Top