+ Reply to Thread
Results 1 to 3 of 3

userid with more then one acc move to a one row.

  1. #1
    Registered User
    Join Date
    01-18-2007
    Posts
    3

    userid with more then one acc move to a one row.

    I have a little problem, hope you can help me.
    I’m using Excel 2000 and 2003.
    I have some userid’s with more then one account.
    Both userid’s and account’s are in two columns.
    Now I want a userid with all his accounts in one row.
    Do you think this is possible?
    Hope to hear soon from you.
    Thank you in advance

    See example
    Userid Account acc1 acc2 acc3 acc4 acc5 acc6
    12345 987654
    12345 321654
    12345 654321
    12345 654987
    12345 741852
    12345 963852
    12345 963853
    12345 963854
    12346 99999978
    12346 99999979
    12346 99999980
    12346 99999981
    12347 32165452
    12348 123000
    12348 123001
    12348 123002
    12349 951357
    12350 159357

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    Try this macro

    Sub Test()
    For N = Cells(65536, 1).End(xlUp).Row To 2 Step -1
    If Application.CountIf(Columns(1), Cells(N, 1)) > 1 Then
    Columns(1).Find(Cells(N, 1), Cells(1, 1), xlValues, xlWhole).End(xlToRight).Offset(0, 1) = Cells(N, 2)
    Rows(N).Delete
    End If
    Next N
    End Sub
    Martin

  3. #3
    Registered User
    Join Date
    01-18-2007
    Posts
    3

    Thanks

    Dear Martin,

    Thank you so much for the solution, the macro works perfect.
    Regards

    Daniel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1