+ Reply to Thread
Results 1 to 9 of 9

problem:Sort

Hybrid View

  1. #1
    Registered User
    Join Date
    09-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    problem:Sort

    Hi,

    I have a problem and was hoping you could help me with it. I have two columns, I want to keep column 1 static and find any values in Column 2 and place them in the same order as found in Column 1. I am attaching a spreadsheet to help explain my question. Column A and B are the two columns and Column D is the desired answer.

    Thanks

    Nimesh
    Attached Files Attached Files

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    re: problem:Sort

    You have values in column-B that do not appear in column-A so you cannot, as I see it, get the results you show in column-D.

    Try this formula in cell E2 and copied down.

    =INDEX($B$2:B6,MATCH(A2,$B$2:B6,0))

  3. #3
    Registered User
    Join Date
    09-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    re: problem:Sort

    That works partially, it shows the values from Column A in the right place but shows #N/A when it does not find values from A in B. hope I am making sense.

    Thanks for the reply

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    re: problem:Sort

    That works partially, it shows the values from Column A in the right place but shows #N/A when it does not find values from A in B.
    Exactly the point I made in previous post - column-B contains values not found in column-A

    If you want to show a blank instead of the #N/A error, use this formula.

    =IF(ISNA(INDEX($B$2:B6,MATCH(A2,$B$2:B6,0))),"",INDEX($B$2:B6,MATCH(A2,$B$2:B6,0)))

  5. #5
    Registered User
    Join Date
    09-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    re: problem:Sort

    I am not sure if this can be done, but is it possible to put the values from Column B which were not found in column A in the blank cells ?

    Thanks,

  6. #6
    Registered User
    Join Date
    09-05-2009
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    55

    re: problem:Sort

    Nimesh
    Palmetto is correctm, just replace "" for your needed column data

    reeditred from Palmettos code

    =IF(ISNA(INDEX($B$2:B6,MATCH(A2,$B$2:B6,0))),B2,INDEX($B$2:B6,MATCH(A2,$B$2:B6,0)))



    Vora

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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