+ Reply to Thread
Results 1 to 4 of 4

sorting table by dependent column

  1. #1
    Registered User
    Join Date
    07-09-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    18

    sorting table by dependent column

    Hello,

    This is my situation:

    I have a table... the firm column contains serial numbers, and the subsequent columns contain values that are obtained from other tables using VLOOKUP (using the serial numbers).

    The second column is 'surname', and I'd like to sort the table by surname.

    However, when I click 'sort' and choose to do it by surname, it doesn't work as intended - seemingly because the columns other than the first are full of formulae, something strange happens and I don't get the required result.

    Is this a common problem? How is it remedied?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: sorting table by dependent column

    Add filter in first row and try use sort in filter

  3. #3
    Registered User
    Join Date
    07-09-2009
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: sorting table by dependent column

    that produces the same result.

    to be specific about what is happening:

    Say when I sort by surname rows 2 and 5 are meant to swap. This happens, except THE FORMULAE swap too - so the vlookup originally in row 2, referencing A2, is moved to row 5, but still references A2... but the values (serial numbers) in A2 and A5 were swapped by the sort!!

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

    Re: sorting table by dependent column

    now im lost. post a workbook with a sample of what it looks like before and after sort
    but if you select all the data and sort by name the reference numbers will move with the names
    "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