Closed Thread
Results 1 to 13 of 13

Keeping blank rows when sorting

  1. #1
    Registered User
    Join Date
    04-21-2008
    Posts
    8

    Keeping blank rows when sorting

    I have a spreadsheet that I want to keep the blank rows that seperate the data for asthetic reasons. Can I sort just the rows with data in them and still keep the blank rows where they are?

    Thanks for your assistance

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    I presume you have groups of data separated by blanks and you want to sort within the sets.

    I think you can only do this by sorting each set of rows individually - Excel would not know where to put blanks otherwise
    Ed
    _____________________________
    Always learning, but never enough!
    _____________________________

  3. #3
    Registered User
    Join Date
    11-16-2007
    Posts
    26
    Quote Originally Posted by EdMac
    I presume you have groups of data separated by blanks and you want to sort within the sets.

    I think you can only do this by sorting each set of rows individually - Excel would not know where to put blanks otherwise
    I have an idea, but don't know much about changing the filter settings. So perhaps you know.

    Is it possible to have it filter for things in common?

    For example, you have 2 variations of inputs, and create a 3rd.
    a,
    b,
    a, b

    The idea being that you would make the "blank" row a, b and change the font color to make it appear hidden.

    Then when you select either a, or b, it could also recognize either value in the "blank" and leave that in the chart? The challenge would be if there were a lot of variations, then that blank cell would need to contain all of them.

  4. #4
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Difficult to visualise what you want to achieve - can you post an example? You need to ZIP it first

  5. #5
    Registered User
    Join Date
    11-16-2007
    Posts
    26
    Here is a model of what I mean for the filter allowing the "blank" rows. Maybe it's better to refer to them as the universal value row?
    Attached Files Attached Files

  6. #6
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    I don't think that what you want is possible (I'm not sure what purpose it serves either).

    Perhaps if you were to describe the problem you want to solve, there might be another way to achieve it.

  7. #7
    Registered User
    Join Date
    11-16-2007
    Posts
    26
    This thread wasn't started discussing the purpose, it was started asking how to do it. But to give an example where it could help: we have a type of catalog that has say 20 different categories with 250 different items. It was setup to have the blank rows in between, which makes it easier to visually scroll through. In that case, it'd be nice to filter and keep the natural segregation. The alternating row colors option wouldn't work well as filtering could combine similar colors afterward.

    The one solution I can think of is having 1 column for each possible autofilter selection (say type a and b would use 2 columns). Then you would hide an A in the "blank" row in the A filter column, and a B in the B filter column. That way when you select A, the "blank" row automatically matches, and stays. This method works if you don't have a lot of items to categorize. But if you have 10 or so categories, it starts taking a lot of columns to do this. I really wouldn't consider this a good solution either, it's more of a band aid fix.

  8. #8
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    So, who's asking the questions here?

    Is it duffer_devon or boostjunkie or are they one and the same - this thread is confusing me so I think I'll sign out of it.

  9. #9
    Registered User
    Join Date
    04-21-2008
    Posts
    8

    I've attached the worksheet

    Here is the worksheet I need to sort and keep the blank rows where they are. Any suggestions on how to do this better?
    Keep i nmind this is to display golf scores as they are coming in so it will be updated throughout the day.
    Attached Files Attached Files

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    the simplest way is to reference cells on another sheet
    do your sorting on the other sheet.

    see sheet 2
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-26-2013
    Location
    Chicago, Il
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Keeping blank rows when sorting

    I had an idea and I think I have the code that works. I created a series number column and used Ctrl down to find where the data ranges and blank lines were, then numbered each set as a series. It let me sort within the data sets and keep the blank lines exactly where they were.
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    07-23-2014
    Location
    nicosia,cyprus
    MS-Off Ver
    MS Office 13
    Posts
    4

    Re: Keeping blank rows when sorting

    Hello everyone,

    I wanted to ask something as well i am trying to create a macro that sorts rows based on value of 2 columns, but every time that value changes in either of them to leave an empty row between them.
    Is that possible? In simple words i want to separate my rows and sorting them out alphabetically.

    Kind regards, Andriano

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Keeping blank rows when sorting

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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