+ Reply to Thread
Results 1 to 6 of 6

match columns and find the matched Part number

  1. #1
    Registered User
    Join Date
    02-16-2010
    Location
    Blr
    MS-Off Ver
    Excel 2003
    Posts
    5

    match columns and find the matched Part number

    I have 2 input cells, eg: A1 and b1 where I can input 2 neumeraicls.

    I also have a table in the same sheet with different numbers on 2 coloms and part numbers on the third colom. eg:c1 to c10 and d1 to d10 and part numbers on e1 to e 10.

    If 1 put sizes in a1 and b1, i need to look up c1 to c1 and d1 to d10 and when a match is found use the part number from e1 to e10. eg: i type in 800 in A1 and 600 in B1, I need to match A1 (800) with c1 to C10 and match B1 (600) with d1 to d10. the match will be on a single row and colom e will have the corresponding part number which as to be the ourput.

    I have been struggling with this. Any help is greatly appreciated.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: match 2 sets of coloms and find the matched Part number

    Try:

    =INDEX(E1:E10,MATCH(1,INDEX((C1:C10=A1)*(D1:D10=B1),0),0))

    if the Part Number is actually numeric, not alphanumeric, then you can also use:



    =SUMPRODUCT(E1:E10,--(C1:C10=A1),--(D1:D10=B1))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

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

    Re: match 2 sets of coloms and find the matched Part number

    =index($e$1:$e$10, match(a1 & b1, index($c$1:$c$10 & $d$1:$d$10, 0), 0))
    "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

  4. #4
    Registered User
    Join Date
    02-16-2010
    Location
    Blr
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: match 2 sets of coloms and find the matched Part number

    @NBVC - Thanks your formula worked. @ MartinWilson - Thanks to your formula too. However I have not yet tried it.

    I have one more issue now. In the f1 to f10 I also have a description of the part. I need to have the description in the cell adjoining the part number cell. Should I use Vlookup or is there some other innovative way to do this too?

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: match 2 sets of coloms and find the matched Part number

    You can use Vlookup on the result you just got with formulas above... which would be more efficient

    ... or you can use the same formula replacing E1:E10 with F1:F10:


    =INDEX(F1:F10,MATCH(1,INDEX((C1:C10=A1)*(D1:D10=B1),0),0))

  6. #6
    Registered User
    Join Date
    12-21-2009
    Location
    lisbon
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: match 2 sets of coloms and find the matched Part number

    Sorry, noob question What does "--" stands for?

    saw it on this formula
    =SUMPRODUCT(E1:E10,--(C1:C10=A1),--(D1:D10=B1))

+ 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