+ Reply to Thread
Results 1 to 5 of 5

Thread: Matching and Sorting

  1. #1
    Registered User
    Join Date
    08-15-2007
    Posts
    12

    Matching and Sorting

    Hi,

    I have three columns of data (alpha-numeric part numbers). The first column (B) is the "new part number", the 2nd (I) is the "old" part number, and the 3rd (J) is again the "new" part number.

    The 2nd and 3rd columns are matched, so the "old" part number in I1 matches the "new" part number in J1. Columns C-H contain data (pricing, etc) for the "new" part # that is in column A.

    I would like to add a column and be able to use an "IF" statement to add the correct old part # to correspond to the new part # in column A. I can't just do a simple sort function, because there are a lot of "new" part #'s that do not have corresponding "old" part numbers.

    The formula I have been playing around with is this one:

    =IF(ISNUMBER(MATCH(B2,J:J,0)),I???,"NA")

    I think this will work, if I know how to place the match's row number in place of the ???

    Here is an oversimplified example:
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    341

    Re: Matching and Sorting

    Try this in A1 of your example--->
    =IFERROR(INDEX($I$2:$I$6,MATCH(B2,$J$2:$J$6,0)),"")
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  3. #3
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    341

    Re: Matching and Sorting

    Sorry A1 should be A2.
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  4. #4
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,953

    Re: Matching and Sorting

    Hi jmherbert, try this formula in A2 filled downward:

    =IF(ISNUMBER(MATCH(B2,J:J,0)),INDEX(I:I,MATCH(B2,J:J,0)),"NA")

    Hope that helps!

  5. #5
    Registered User
    Join Date
    08-15-2007
    Posts
    12

    Re: Matching and Sorting

    Thanks! Paul's worked without modifications, khamilton, it didn't work for me, I didn't have time to mess with it. It may be because I am still running the old version.

    Thanks again,

+ 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.2.0