+ Reply to Thread
Results 1 to 6 of 6

Move and sort groups separated by blank lines

  1. #1
    Registered User
    Join Date
    07-22-2021
    Location
    Youngstown, Ohio USA
    MS-Off Ver
    365
    Posts
    13

    Move and sort groups separated by blank lines

    Hello all,

    I am back again with two new challenges. Rows are sorted by column A "ITEM NUMBER" which vary by name, number of lines each day, and separated by a blank row.

    Column H has "ROW LOCATION" that vary from A, B, C, D, E, F, G, H, I, and R with 3 numerical digits following the letter. All R-rows are highlighted in RED.

    I need to move "ITEM NUMBER" groups that do not contain an R-row to the top of the sheet.

    Then I need to sort all "ITEM NUMBER" groups that do contain an R-row alphabetically so the R-row is always at the bottom.

    I tried to record a macro, but doing that does not take into account the number of rows per group that will change each day.

    Any ideas?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Move and sort groups separated by blank lines

    Can you also show what the expected result is? Empty rows are not really useful if you want to sort something. There is no macro in the sample file.
    Messages have been translated from Dutch to English by means of google translate.

  3. #3
    Registered User
    Join Date
    07-22-2021
    Location
    Youngstown, Ohio USA
    MS-Off Ver
    365
    Posts
    13

    Re: Move and sort groups separated by blank lines

    Book 2 is what I need column H to end up like.

    Book 3 is my full template with data pasted from a dashboard, none of the macro buttons have been activated yet.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Move and sort groups separated by blank lines

    2 files with different data are rather difficult to compare. I don't think the result matches the question. Maybe it works like this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-22-2021
    Location
    Youngstown, Ohio USA
    MS-Off Ver
    365
    Posts
    13

    Re: Move and sort groups separated by blank lines

    Template 3A is the desired result. Template 3B is what I am getting with the VenA macro.

    All it did was add an empty line at the top and made it taller.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Move and sort groups separated by blank lines

    Do not use empty rows. If you are unfamiliar with currentregion then you should look it up.

+ 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. From Lines (Data separated by commas) To Columns
    By yourfriend in forum Excel General
    Replies: 22
    Last Post: 07-18-2019, 03:43 PM
  2. [SOLVED] Color lines within the same cell separated by line break
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-27-2018, 10:38 PM
  3. Replies: 26
    Last Post: 01-15-2016, 03:38 AM
  4. [SOLVED] Efficient way to arrange data that is separated into groups
    By Voluntaryist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-18-2014, 08:14 AM
  5. [SOLVED] Struggling to sort matching orders into groups & add product names to break lines between.
    By RaptureAG in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-24-2014, 09:06 AM
  6. Loop through groups of rows separated by empty cells
    By wmbower in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2012, 02:53 PM
  7. [SOLVED] Transposing Groups of Data separated by blank rows
    By scrchrds in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2010, 03:31 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