+ Reply to Thread
Results 1 to 5 of 5

How to Sort Columns by Clicking on Column Header

  1. #1
    Registered User
    Join Date
    02-28-2014
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question How to Sort Columns by Clicking on Column Header

    Hello All,

    I am working on an excel spreadsheet for my office and am trying to figure out how to add a sorting function.
    Essentially, I will have several columns titled "Country" "Region" "Name of Director" "Donor" etc. To facilitate navigating the spreadsheet, I want to add some sort of button to each Column Header that, when you click it, it automatically sorts the data based on "region" or "director" etc.

    ...Pretty much exactly the way that itunes columns work: you click "Song" and it organizes the spreadsheet alphabetically by song. Same thing for album and genre. Mine will be very similar because all the sorting can be done alphabetically. I just want to be able to click on the column head rather than having to go to the "A-Z autofilter" button each time.

    Any help would be greatly appreciated!

    Thanks so much,

    HW

  2. #2
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: How to Sort Columns by Clicking on Column Header

    I think a Pivot Table may be the answer

    http://www.contextures.com/excel-piv...e-sorting.html
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  3. #3
    Registered User
    Join Date
    02-28-2014
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to Sort Columns by Clicking on Column Header

    Blake 7, thank you. I think that the pivot table is the first step of what I'm looking for. Although, I'm still having trouble with the formatting. I'm trying to achieve one small arrow in each of the column headers that enables sorting of all the information in the column. Could you help with the pivot table format?? I'm not sure how to embed an example of my document, but if I can figure that out then I will share. Thanks!

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to Sort Columns by Clicking on Column Header

    why not just convert range to a table? its only 2 clicks to sort a table
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    02-28-2014
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to Sort Columns by Clicking on Column Header

    Okay, I have attached an example. I need the header buttons rather than using the sort button because I need to share it with colleagues and don't want their sorting changes to be saved. ie just like the itunes song sorting features.

    Column Sorting Test.xlsx

+ 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] 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
  2. Sort columns by header row
    By jsp_1951 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-02-2011, 12:37 PM
  3. Code to Sort Data by Clicking on Header Row Cells
    By Coop913 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-07-2009, 01:24 PM
  4. Replies: 3
    Last Post: 05-17-2009, 04:31 AM
  5. Sort by Clicking on column headers
    By ExcelUserBob in forum Excel General
    Replies: 3
    Last Post: 12-17-2007, 11:09 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