+ Reply to Thread
Results 1 to 4 of 4

Sorting multiple columns

  1. #1
    Hexius
    Guest

    Sorting multiple columns


    Howdy everyone,

    I'm having a problem in excel that I can't figure out, and I thought
    someone here might have a good solution.

    Basically what I am trying to do, is take anywhere from 2-10ish columns
    of data, sort it, and have identical data lined up on the same row. The
    data will always be names.

    For example....

    The original data might look like:


    Code:
    --------------------
    A B C D
    1 Bill Chuck Dave Derek
    2 Chuck Bill Derek Dave
    3 Jane Jane Fred Murphy
    4 Jim Murphy Murphy Chuck
    5 Fred Jim Jane
    6 Murphy Derek Jim
    7 Dave Chuck
    8 Derek
    --------------------


    Then after sorting it I'd like it to look like:


    Code:
    --------------------
    A B C D
    1 Bill Bill
    2 Chuck Chuck Chuck Chuck
    3 Dave Dave Dave
    4 Derek Derek Derek Derek
    5 Fred Fred
    6 Jane Jane Jane
    7 Jim Jim Jim
    8 Murphy Murphy Murphy Murphy
    --------------------


    I can obviously sort each column one by one, and then drag it around to
    be lined up... but I didn't know if there was some simple function or
    macro that I wasn't aware of that would do what I want.

    Thanks for any suggestions.


    --
    Hexius

  2. #2
    Max
    Guest

    Re: Sorting multiple columns

    One way ..

    Assuming source data in sheet: X
    where the key* col is assumed col A
    *i.e. col A contains the full list of all names

    In another sheet: Y,

    Copy > paste col A from X into col A
    Do a data > sort > ascending

    Then place in B1:
    =IF(ISNUMBER(MATCH($A1,X!B:B,0)),$A1,"")
    Copy across to D1, fill down

    Y will return the required results
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "Hexius" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Howdy everyone,
    >
    > I'm having a problem in excel that I can't figure out, and I thought
    > someone here might have a good solution.
    >
    > Basically what I am trying to do, is take anywhere from 2-10ish columns
    > of data, sort it, and have identical data lined up on the same row. The
    > data will always be names.
    >
    > For example....
    >
    > The original data might look like:
    >
    >
    > Code:
    > --------------------
    > A B C D
    > 1 Bill Chuck Dave Derek
    > 2 Chuck Bill Derek Dave
    > 3 Jane Jane Fred Murphy
    > 4 Jim Murphy Murphy Chuck
    > 5 Fred Jim Jane
    > 6 Murphy Derek Jim
    > 7 Dave Chuck
    > 8 Derek
    > --------------------
    >
    >
    > Then after sorting it I'd like it to look like:
    >
    >
    > Code:
    > --------------------
    > A B C D
    > 1 Bill Bill
    > 2 Chuck Chuck Chuck Chuck
    > 3 Dave Dave Dave
    > 4 Derek Derek Derek Derek
    > 5 Fred Fred
    > 6 Jane Jane Jane
    > 7 Jim Jim Jim
    > 8 Murphy Murphy Murphy Murphy
    > --------------------
    >
    >
    > I can obviously sort each column one by one, and then drag it around to
    > be lined up... but I didn't know if there was some simple function or
    > macro that I wasn't aware of that would do what I want.
    >
    > Thanks for any suggestions.
    >
    >
    > --
    > Hexius




  3. #3
    Hexius
    Guest

    Re: Sorting multiple columns


    Thank you for the reply Max! While the method you suggested isn't
    exactly what I was looking for, it works great and will probably be
    what I wind up using. I'll have to tweak the way my excel sheet is set
    up a bit, but that is done easily enough.

    Ideally, I would like to use a macro or script of some sort that I
    could just run once on the one sheet to have it automatically sort the
    columns.

    Thanks for your suggestion though, it gets the job done!

    Max Wrote:
    > One way ..
    >
    > Assuming source data in sheet: X
    > where the key* col is assumed col A
    > *i.e. col A contains the full list of all names
    >
    > In another sheet: Y,
    >
    > Copy paste col A from X into col A
    > Do a data sort ascending
    >
    > Then place in B1:
    > =IF(ISNUMBER(MATCH($A1,X!B:B,0)),$A1,"")
    > Copy across to D1, fill down
    >
    > Y will return the required results
    > --
    > Max
    > Singapore
    > http://savefile.com/projects/236895
    > xdemechanik
    > ---
    > "Hexius" [email protected] wrote in message
    > news:[email protected]...
    >
    > Howdy everyone,
    >
    > I'm having a problem in excel that I can't figure out, and I thought
    > someone here might have a good solution.
    >
    > Basically what I am trying to do, is take anywhere from 2-10ish
    > columns
    > of data, sort it, and have identical data lined up on the same row.
    > The
    > data will always be names.
    >
    > For example....
    >
    > The original data might look like:
    >
    >
    > Code:
    > --------------------
    > A B C D
    > 1 Bill Chuck Dave Derek
    > 2 Chuck Bill Derek Dave
    > 3 Jane Jane Fred Murphy
    > 4 Jim Murphy Murphy Chuck
    > 5 Fred Jim Jane
    > 6 Murphy Derek Jim
    > 7 Dave Chuck
    > 8 Derek
    > --------------------
    >
    >
    > Then after sorting it I'd like it to look like:
    >
    >
    > Code:
    > --------------------
    > A B C D
    > 1 Bill Bill
    > 2 Chuck Chuck Chuck Chuck
    > 3 Dave Dave Dave
    > 4 Derek Derek Derek Derek
    > 5 Fred Fred
    > 6 Jane Jane Jane
    > 7 Jim Jim Jim
    > 8 Murphy Murphy Murphy Murphy
    > --------------------
    >
    >
    > I can obviously sort each column one by one, and then drag it around
    > to
    > be lined up... but I didn't know if there was some simple function or
    > macro that I wasn't aware of that would do what I want.
    >
    > Thanks for any suggestions.
    >
    >
    > --
    > Hexius



    --
    Hexius

  4. #4
    Max
    Guest

    Re: Sorting multiple columns

    Glad it helped !
    Thanks for the feedback
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "Hexius" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Thank you for the reply Max! While the method you suggested isn't
    > exactly what I was looking for, it works great and will probably be
    > what I wind up using. I'll have to tweak the way my excel sheet is set
    > up a bit, but that is done easily enough.
    >
    > Ideally, I would like to use a macro or script of some sort that I
    > could just run once on the one sheet to have it automatically sort the
    > columns.
    >
    > Thanks for your suggestion though, it gets the job done!




+ 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