+ Reply to Thread
Results 1 to 5 of 5

Sorting by one cell in each group?

  1. #1
    Registered User
    Join Date
    07-18-2015
    Location
    Virginia
    MS-Off Ver
    2013
    Posts
    2

    Sorting by one cell in each group?

    Hello,

    I was wondering if someone might be kind enough to help me.

    I am trying to sort entire groups by one cell in each group.
    I can't figure out how to maintain the integrity of the groups.

    I would like to sort the groups based on data in 7th column 2nd row -- from largest to smallest.

    In the example I have attached, I highlighted the cells I would like to sort the groups by. The data starts on the 5th row. I would like to sort by G6, G14,
    G22, G30, G38, G46, G54, G62, G70, G78, G86, G94, G102, G110 and G118.


    I am completely at a loss as how to do this. Filters? Pivot Tables? Dummy Columns? VBA?

    Thank you thank you thank you! I really do appreciate any assistance.

    --Luke
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Sorting by one cell in each group?

    Try this macro approach. The grouping was causing some problems with the sort so I have removed it and then reapplied it at the end.

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007/2010/2013.
    Martin

  3. #3
    Registered User
    Join Date
    07-18-2015
    Location
    Virginia
    MS-Off Ver
    2013
    Posts
    2

    Re: Sorting by one cell in each group?

    MRice,

    Thank you. That worked great. I really appreciate you taking the time to answer my question.

    --Luke

  4. #4
    Registered User
    Join Date
    07-19-2015
    Location
    Barranquilla, Colombia
    MS-Off Ver
    2010
    Posts
    4

    Re: Sorting by one cell in each group?

    Hi,
    I want to do the same type of sort but your macro doesn't work on my spreadsheet. here is a description/layout -

    1A-1F merged for section header
    2A empty, 2b-2f headers
    3A-7A headers
    3b,4b,5b,6b,7b - 3f,4f,5f,6f,7f text data
    8a empty, 8b-8c merged for text, 8d-8e merged for text, 8f empty
    9a through 16f are a repeat of the above format with different text data only and the header text data in 9a is different section header
    This format repeats many times, currently something like 40 or more, and it will continue to get larger.
    It's all text.
    I want the sort to occur on every 9th row.
    I tried using groups but Excel does not sort on groups, seems like a rather short-sighted oversight on the part of MS, IMO.

    I have tried to use MS Word but the random and inconsistent self-formatting that Word does drives me nuts.

    Is there a way to sort the groups while maintaining the integrity of the groups? Or would I be better off doing this in Access?
    Attached Files Attached Files

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Sorting by one cell in each group?

    Suggest that you start a new thread to get the best chance of a response.

+ 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. Sorting multiple row group
    By lolla70 in forum Excel General
    Replies: 2
    Last Post: 04-29-2013, 09:53 AM
  2. Vertical Group, breaking when sorting
    By wacky_diva in forum Excel General
    Replies: 0
    Last Post: 01-31-2013, 10:58 PM
  3. Sorting a group of cells based on value in one cell
    By antpro26 in forum Excel General
    Replies: 0
    Last Post: 08-16-2011, 02:33 AM
  4. Referencing group summary and sorting
    By cshort in forum Excel General
    Replies: 5
    Last Post: 08-10-2011, 02:34 PM
  5. Replies: 7
    Last Post: 10-19-2010, 06:32 AM
  6. Sorting Group
    By jhon11 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-20-2007, 01:54 PM
  7. [SOLVED] Sorting by Group of Cells
    By -random- in forum Excel General
    Replies: 4
    Last Post: 11-20-2005, 12:20 AM
  8. excel group sorting
    By meehaha in forum Excel General
    Replies: 1
    Last Post: 07-05-2005, 03:05 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