+ Reply to Thread
Results 1 to 2 of 2

Help with sorting unique records and moving duplicate entries to one row

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question Help with sorting unique records and moving duplicate entries to one row

    I have been trying to use pivot tables, sort and filter and no luck. The data that I have is a the following:

    Number Level
    234 12
    456 13
    456 14
    7855 11
    352 15
    342 18
    342 21
    342 50

    And, I want the data to look like the following:

    Number Level Level Level
    234 12
    456 13 14
    7855 11
    352 15
    342 18 21 50

    Is there a macro or formula that can apply to the entire document? The entire document is 10000 rows of data but there are only 15 different levels. Thank you.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,791

    Re: Help with sorting unique records and moving duplicate entries to one row

    10000 rows of data and 15 levels. In your example you have duplicate number but can you have duplicate level as well?

    Par example you have

    342 18
    342 21
    342 50

    could you have say another 342 18 in your data and if so how should that be sorted?

    Perhaps 342 18 18 21 50 ? Or should duplicate lines (number and level) be deleted? Finally should the level value be sorted as well? If so Left to Right or Right to Left?

    I've written a macro that works for your small example but that doesn't prove it could handle 10 000 rows of data. You could test it on a sample of some hundred lines and se how it "behaves". This macro assumes that your data starts in A1 and except for column A and B the columns C to T must be empty. There is no level sorting done at the moment in this macro.


    Please Login or Register  to view this content.
    Perhaps you could upload a workbook with about 1000 rows of data so I have a better chance to see how this code works with more data.

    Alf

+ 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