+ Reply to Thread
Results 1 to 3 of 3

Sort With Blanks

  1. #1
    Registered User
    Join Date
    02-10-2010
    Location
    Ohio
    MS-Off Ver
    Excel 2003
    Posts
    24

    Sort With Blanks

    Hello, I am trying to sort data that have blank cells between the data. How do I sort the information and keep the blanks between the data. Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664

    Re: Sort With Blanks

    Hi there,

    You could create a helper column which you use to sort. In the helper column put the following formula (assuming the column you actually want to sort is A):

    =IF(A2="",A1&"blank",A2)

    This will duplicate the populated cells in column A, and create the entry plus the word "blank" at the end where the cells are blank. When you sort the helper column it will keep the entryblank value below the actual entry and in column A retain the empty cell.

    Note: this solution only works where there is a single blank row inbetween entries...

    Hope that makes sense.

    SamuelT

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

    Re: Sort With Blanks

    in b1 put =a1
    in b2
    put =IF(A2="",B1,A2) and drag down then sort by col b
    "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

+ Reply to 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