+ Reply to Thread
Results 1 to 5 of 5

sort columns based on another column

  1. #1
    Registered User
    Join Date
    04-11-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    46

    sort columns based on another column

    Dear All

    my data looks like this

    id1 id fut X
    6 1 3 77.60
    8 2 4 77.76
    3 3 6 77.93
    7 4 11 77.43
    10 5 12 77.60
    9 6 13 77.76
    1 7 12 77.93
    2 8 11 77.10
    4 9 12 77.26
    5 10 3 77.43


    and I want to do this

    id1 id fut X
    6 6 13 77.76
    8 8 11 77.10
    3 3 6 77.93
    7 7 12 77.93
    10 10 3 77.43
    9 9 12 77.26
    1 1 3 77.60
    2 2 4 77.76
    4 4 11 77.43
    5 5 12 77.60

    i.e. arrange columns according to id1. Hope someone could help me. Thanks,

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,531

    Re: sort columns based on another column

    I used this formula, which can be copied across and down, to reorder the three columns for your second table.
    Please Login or Register  to view this content.
    Columns Sort.xlsx

    Let me know if you have any questions.
    Last edited by JeteMc; 10-10-2015 at 09:07 AM. Reason: attached file

  3. #3
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: sort columns based on another column

    @ kuntalnr

    SortColumns.xlsx

    I think I understood what you want.
    please check attached file and let's know if it's OK
    Barriers are there for those who don't want to dream

  4. #4
    Registered User
    Join Date
    04-11-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: sort columns based on another column

    thanks both of you. this works.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,531

    Re: sort columns based on another column

    You are welcome, thank you for the feedback. Please mark the thread as 'Solved' using the thread tools above your first post. Hope that you have a good day.

+ 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. Need to Sort Columns in Summary Sheet Based on Priority Columns
    By Kandavalli.Kiran in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2015, 09:47 PM
  2. Replies: 4
    Last Post: 06-11-2014, 10:39 AM
  3. [SOLVED] Rearrange(sort) Columns based on number in Column header string.
    By hifliers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 01:36 AM
  4. [SOLVED] I have a sort macro. How to add script to preselect rows to sort based on column value?
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-09-2014, 02:25 AM
  5. Replies: 2
    Last Post: 01-15-2014, 09:31 AM
  6. Replies: 5
    Last Post: 04-25-2013, 11:50 PM
  7. [SOLVED] Sort multiple columns based on column header
    By Langer101 in forum Excel Programming / VBA / Macros
    Replies: 39
    Last Post: 01-09-2013, 09:55 AM

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