Return Value By Multiple Matching And Unmatching Criteria

  • I am developing Spreadsheet that you will enter a list of parts that you need. it will have many columns but only 4 are vital to the check. this will be generated for each project.


    With each part i want to then look up in another file that is a list of all the possible parts you can have with there cost. this file will be standard for everything and it will be updated from time to time.


    now not all the criteria to look up will be exact matches.


    here is an example


    code temp/pres rating diameter material
    GLV 4500 15 16Mo3


    in the other file we will have multipu entries for GLV with different values.


    code temp/pres rating diameter material Cost Reference
    GLV 4500 20 16Mo3 400 aaa1
    GLV 5500 15 16Mo3 350 aab1
    GLV 5000 15 16Mo3 300 aab2
    GLV 5000 15 13CrMo4-5 600 acb1
    GLV 5500 15 13CrMo4-5 600 acb2


    For Code i need it to match (there are lots of codes even including variations like GLV.)
    For Temp/pres rating i need it to be equal or higher to the value
    For diameter i need a match
    for material i need a match.


    so as you can see from the list above there are 2 options. so then i want it to return the cheapest.


    that is step one.


    step two is to repeat it for multiple list of parts.


    Thanks for you help. and if you have any questions let me know.


    i have searched the forum for a couple hours and did not find what i needed. but if you know one that is best fitted for me then let me know.


    thanks again

  • Re: Look Up And Return Value By Multiple Matching And Unmatching Criteria


    Try this code. Assumes the part number you are looking for is in cell A1. Your workbook tables have to be open and the table in a sheet called "Table". Change names as required.


    [FONT="Arial Black"][COLOR="blue"][SIZE="4"]Bill[/SIZE][/COLOR][/FONT]
    Tip: To avoid chasing code always use Option Explicit.

  • Re: Look Up And Return Value By Multiple Matching And Unmatching Criteria


    Thank you all. will look at these in the morning when i am back in the office.

  • Re: Look Up And Return Value By Multiple Matching And Unmatching Criteria


    Corrected and enhanced code from prior post. Assumes Tables are in a sheet named "Table" and the part table is a named range "Table" in each workbook and your part number to find is in cell A1.


    [hr]*[/hr] Auto Merged Post;[dl]*[/dl]My firt posted code was for part numbers as a single string. This code is for part numbers in idividual columns. Assume looked for part number is in cells A1:A4


    [FONT="Arial Black"][COLOR="blue"][SIZE="4"]Bill[/SIZE][/COLOR][/FONT]
    Tip: To avoid chasing code always use Option Explicit.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!