+ Reply to Thread
Results 1 to 4 of 4

Locking rows together when sorting

  1. #1
    Registered User
    Join Date
    04-30-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Locking rows together when sorting

    I need to lock consecutive rows together before sorting. e.g. A1 contains a name and A2 is blank: B1 contains data related to name in A1 - so does B2, and so on. Therefore need to lock rows 1 and 2 together, then 3 and 4 together and so on, but sorting on the data in the first cell of the group e.g. A1
    Last edited by tuganne1; 05-02-2009 at 03:20 PM.

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

    Re: Locking rows together when sorting

    insert another column somewhere
    in first cell put =a1 in second =a1
    highlight both and drag down
    it should now go
    =a1
    =a1
    =b1
    =b1
    =c1
    =c1
    and so on
    now sort sheet by that column,delete when done
    edit i dont know what came over me that should say
    =a1
    =a1
    =a3
    =a3
    =a5
    =a5
    Last edited by martindwilson; 05-01-2009 at 02:13 PM. Reason: oops it wrong
    "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

  3. #3
    Registered User
    Join Date
    04-30-2009
    Location
    Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Smile Re: Locking rows together when sorting

    Thanks Martin,
    I've already thought of that one - just thought that there may have been a neater solution.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Locking rows together when sorting

    A1 contains a name and A2 is blank:
    That's very bad practice in Excel; it circumvents many of Excel's capabilities.
    Entia non sunt multiplicanda sine necessitate

+ 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