+ Reply to Thread
Results 1 to 5 of 5

sorting groups of data without changing the data within the groups

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

    Question sorting groups of data without changing the data within the groups

    Hi,
    I hope someone might be able 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.

    At first I set up my data into groups using the Groups feature of Excel, but the sort function does not operate on whole, complete groups.
    So I removed the groups outlines.
    I would like to sort the groups based on data on every 9th row, first column, in alphabetical order.

    Currently I have something like 40 or more of these "data groups", and it will continue to get larger.
    It's all text.

    I have tried to use MS Word, but don't see a way to do it there as well, and 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? I imported the raw data into Access, but again, do not see how to sort groups of data by one field in each group. If necessary, I could use Access for the sorting procedure then send the data back to Excel for formatting for Documents To Go. Whatever is easiest.

    My goal is to have an alphabetical list of groups of text data that will be in .xls format so I can read it on my old Blackberry in the Documents To Go app.(hmm, it appears that Access files are not viewable in Documents To Go.)

    The attached example.xlsx has two of the complete groups. The file will continue to get large, perhaps as many as 100 or more of these groups of text data.

    The format of the groups is this:
    1A-1F merged for group header (this is the column I want the groups of data sorted by - the first word in this cell is the sort key)
    2A empty, 2b-2f column headers
    3A-7A row 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 and header text data
    repeat for another 9 rows, ad nauseum.

    Thanks for any help you can provide.
    --
    Chip
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: sorting groups of data without changing the data within the groups

    Perhaps with this bit of code, which could be adapted to your spreadsheet:

    To run the macro, hit alt+F8.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

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

    Re: sorting groups of data without changing the data within the groups

    Thanks for the code, I did get it to work without errors, but nothing is changed in the results. The order of the data groups is the same after running the script.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465
    There are three tabs. There reorder appears on the third tab. It could be adapted to kill the first tab and replace it with the results after the run.

    The code pulls the infinitive headers, sorts them, and then pulls each block and pastes them in that order to the End tab.

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

    Re: sorting groups of data without changing the data within the groups

    Yes, I know about the 3 tabs, I had to name the two new tabs as they didn't exist previously. The results in the third tab are the same as the original data in the first tab after running the script.

+ 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] Sorting data into ranges/groups
    By Bandicoot in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-16-2015, 10:08 AM
  2. Sorting large groups of data..
    By GroupStats in forum Excel General
    Replies: 3
    Last Post: 06-17-2013, 12:48 AM
  3. Sorting Groups of Data in Excel 2003
    By kyrielynn in forum Excel General
    Replies: 7
    Last Post: 07-06-2012, 04:58 PM
  4. Excel - Sorting Groups of Duplicate Data
    By chrisjc19 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-04-2011, 07:37 PM
  5. sorting data in groups at pivot table
    By ruleworld in forum Excel General
    Replies: 4
    Last Post: 01-07-2011, 10:31 PM
  6. Sorting Data in groups
    By elfnt in forum Excel General
    Replies: 7
    Last Post: 08-19-2010, 11:18 AM
  7. Sorting data in groups
    By baheck in forum Excel General
    Replies: 1
    Last Post: 03-30-2010, 05:39 PM

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