+ Reply to Thread
Results 1 to 4 of 4

Combination data sorting macro

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    36

    Combination data sorting macro

    I have two columns, left is called OD right is called ID. In each OD there are multiple ID's but this is shown for example as:

    OD-----------ID
    254000---- 0
    254000---- 127000
    285750---- 0
    285750---- 127000
    285750---- 158750
    304800---- 0
    304800---- 127000

    Therefore, showing duplicates for the OD. The required format is:

    254000--- 0--- 127000
    285750--- 0--- 127000--- 158750
    304800--- 0--- 127000

    This shows each OD in the first column (no duplicates) and the corresponding ID's in the columns on the right. The example is done with small amount of numbers however, the data I am working with consists of thousands of rows therefore is not practical to do by hand. Please see attached spread sheet for example template with both unsorted and sorted data shown.

    I attempted to do this by using the following code:

    Please Login or Register  to view this content.
    However, this worked nothing like what was expected and I am now totally confused. I would appreciate any help at all with this. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-07-2013
    Location
    south africa
    MS-Off Ver
    Excel 2003-13
    Posts
    210

    Re: Combination data sorting macro

    Hello
    Looks kind of familiar to something I did, can't remember but I had it working.
    Where do you want to show the result (a new sheet, same sheet, delete the old data and replace ?)

    Regards
    Most helpful to mark solved items as such (see help for directions). Star ratings are always welcome.

  3. #3
    Forum Contributor
    Join Date
    01-07-2013
    Location
    south africa
    MS-Off Ver
    Excel 2003-13
    Posts
    210

    Re: Combination data sorting macro

    Hello
    Try something like this :
    Please Login or Register  to view this content.
    Could be a bit slicker I suppose but seems to work

  4. #4
    Registered User
    Join Date
    12-03-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Combination data sorting macro

    Wow, thank you this is great!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sorting a combination text/numeric value
    By JimDandy in forum Excel General
    Replies: 4
    Last Post: 10-02-2013, 12:48 PM
  2. Sorting combination of Number & Text within individual Excel Cell
    By gsansom in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-02-2013, 12:09 PM
  3. [SOLVED] Macro for sorting multiple columns to row / column combination
    By daryln in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2012, 12:33 AM
  4. Replies: 0
    Last Post: 12-22-2011, 03:42 PM
  5. Table Combination with Sorting
    By Fletch in forum Excel General
    Replies: 0
    Last Post: 01-18-2006, 01:15 PM

Tags for this Thread

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