+ Reply to Thread
Results 1 to 5 of 5

[ASK] how to solve column to row sort table by 3 column (A,B,C) ?

  1. #1
    Registered User
    Join Date
    10-24-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    10

    [ASK] how to solve column to row sort table by 3 column (A,B,C) ?

    Excuse me, I'm a newbie want to ask some question about my problem.
    how to solve column to row sort table range by 3 column (A,B,C) like this?

    pict.JPG

    so, it's sort by column A (name), B (city), and C (item)

    I'm using this reference from JBeaucaire (https://sites.google.com/a/madrocket...n-sets-to-rows)
    but that's only works with sort by 1 column

    I hope, all seniors can help me to solve this problem.
    Thank You
    Last edited by JBeaucaire; 12-26-2019 at 04:26 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: [ASK] how to solve column to row sort table by 3 column (A,B,C) ?

    Just add filters to row 2

    Highlight row 2 then hit the keys on your keyboard (One at a time) in this order
    ALT
    A
    T

    You will see small arrows appear in the boxes or headers of your data. Use these to sort by the column(s) of choice -
    -If you think you are done, Start over - ELeGault

  3. #3
    Registered User
    Join Date
    10-24-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: [ASK] how to solve column to row sort table by 3 column (A,B,C) ?

    thanks sir, but I mean not just sort but also delete the same item without removing its value. Like my thread before (http://www.excelforum.com/excel-gene...ml#post3876792)
    at my thread before my problem was solved using makro code

    code.JPG

    but only columntorow sort by 1 column, and now I want columntorow sort by 3 column.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: [ASK] how to solve column to row sort table by 3 column (A,B,C) ?

    Seems like the original macro would still work if you prepared your data.

    1) Insert a new blank column A
    2) In A3, put this formula and copy down: =B3&"-"&C3&"-"D3
    This creates a single-cell version of your 3 columns.
    3) Copy A3:A1000 and do a PasteSpecial > Values to flatten column A and remove the formulas.
    4) Delete columns B:D

    5) Now the data is in the correct format, run the macro.

    6) When merge is complete, insert two blank columns as B:C
    7) Highlight the data in column A and do a TEXT-TO-COLUMNS split on the "-" character, this will split the data back out to 3 columns.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    10-24-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    10

    Re: [ASK] how to solve column to row sort table by 3 column (A,B,C) ?

    Thanks a lot JBeaucaire for your help, You're very kind.
    God Bless You

+ 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] Look at column in table, remove duplicates and sort to another table
    By pdx-adm-trm01 in forum Excel General
    Replies: 1
    Last Post: 03-19-2014, 06:56 PM
  2. Sort table/column by date ?
    By spookiepower in forum Excel General
    Replies: 29
    Last Post: 07-23-2013, 05:03 AM
  3. Sort data from one column into a table
    By Iterationfail in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2013, 11:07 AM
  4. [SOLVED] Need a formula to sort a table into table (for a Table Plan) and name in column 2
    By jbpianoman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2012, 09:21 AM
  5. [SOLVED] Sort Table by Column
    By phalkon30 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2012, 04:37 PM

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