+ Reply to Thread
Results 1 to 16 of 16

Lookup two Values in Table

  1. #1
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Lookup two Values in Table

    I have set up a table that has one value that I need to bring back.

    I'm trying to use the lookup function but I"m getting stuck on the two criteria.

    ex. In state NY and Product G then bring back 5%

    ex. In state IA and Product G then bring back 8%

    I the states and products on one tab and the % is on a separate tab in a table listing out product,state, and %.
    Last edited by NBVC; 05-12-2010 at 02:17 PM.

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

    Re: Lookup two Values in Table

    How many variable/combinations can there be and does each have it's own percentage to return?
    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
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    State Product Bonus Rate
    NY NY Plus 5%
    NJ Xtra 5%
    NJ Preferred Xtra 5%
    NJ Xtra 5%
    NJ Preferred Xtra 5%
    AK Xtra 5%
    AK Preferred Xtra 5%
    CT Xtra 5%
    CT Preferred Xtra 5%
    DE Xtra 5%
    DE Preferred Xtra 5%
    FL Xtra 5%
    FL Preferred Xtra 5%
    MN Xtra 5%
    MN Preferred Xtra 5%
    OR Xtra 5%
    OR Preferred Xtra 5%
    PA Xtra 5%
    PA Preferred Xtra 5%
    TX Xtra 5%
    TX Preferred Xtra 5%
    UT Xtra 5%
    UT Preferred Xtra 5%
    WA Xtra 5%
    WA Preferred Xtra 5%
    Other Xtra 8%
    Other Preferred Xtra 8%

    Well there are not that many combinations. Basically there are two rates 5% and 8%. The examples above are the states and products that should return the 5% and all others not contained in this list should return 8%.

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

    Re: Lookup two Values in Table

    Maybe an attached file showing what you have and what you want would be better.

    Can you attach a sample file?

  5. #5
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    I'm trying to populate column C on the calc tab with a matching rate from the Table tab based on State and product.
    Attached Files Attached Files

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

    Re: Lookup two Values in Table

    The items in column B of the 2 sheets don't exactly match.. you have extra words, etc.. so you will get errors for most...

    Can you make them match...

    If so:

    Something like:

    =IF(SUMPRODUCT(--(Table!$A$2:$A$28=A2),--(Table!$B$2:$B$28=B2),Table!$C$2:$C$28),SUMPRODUCT(--(Table!$A$2:$A$28=A2),--(Table!$B$2:$B$28=B2),Table!$C$2:$C$28),8%)

    will return what is in the table if match is found, else 8% if not found.

  7. #7
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    I have a better example. I did want to calculate one more item. If the product is not in the table I want the bonus rate to = 0%.

    So for example:

    C2 on Calc Sheet bonus rate would be 0 because the product is not listed on the table tabl

    C417 would be 5 % because MultiChoice Income Plus in CT is listed at 5%.


    C398 Would be 8% becaue MultiChoice Income Plus in IA is not on the table as a match on state and product but does match the criteria for C48. it's a product match but not a state match.
    Attached Files Attached Files

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

    Re: Lookup two Values in Table

    Does this work?

    Please Login or Register  to view this content.
    copied down.

  9. #9
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    I will check this when I get back to work tomorrow. I really appreciate your help with this. This is the last info that I am not able to figure out. MUCH appreciated.

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Lookup two Values in Table

    The uploaded file implies use of XL2007 - if so:

    Please Login or Register  to view this content.
    If not and/or you require backwards compatibility with earlier versions (thus precluding use of IFERROR and SUMIFS) then one alternative:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    Quote Originally Posted by NBVC View Post
    Does this work?

    Please Login or Register  to view this content.
    copied down.
    This worked fantastically. You making me look like the star in the office today. Much thanks I really appreciate your help.

  12. #12
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    I have a VERY similar issue to this that only requires the return of yes or no. I've written up what I believe to be close but then again any help on where this is wrong would be greatly appreciated.

    =IF(SUMPRODUCT(--(productMVA=L2),--(StateMVA=K2),MVAResult),SUMPRODUCT(--(productMVA=L2),--(StateMVA=K2),MVAResult),IF(COUNTIF(StateMVA,F7),No))

    I'm trying to look to a table for a state and product and if it's there return yes and if not no.

    The state and product have to be in the combo listed so it would have to be a True True for column A and B.

    I've attached my work. Any constructive feedback is always welcome.
    Attached Files Attached Files

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

    Re: Lookup two Values in Table

    Do you mean?

    =IF(SUMPRODUCT(--(MVAProduct=B2),--(MVAState=A2)),"Yes","No")

  14. #14
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    YOUR Amazing. Thanks Again.

  15. #15
    Registered User
    Join Date
    05-06-2010
    Location
    Des Moines
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Lookup two Values in Table

    Allright last time on here today, You've shown me how to select based on criteria and then give one of three responses, in the second example you explained how to give a simple yes answer based on a True True in a two column table.


    What I need to do here is return a Yes or no based on three columns:


    On the Calculation Sheet Columns, AH and AI are the criteria I'm using. if those two values such as MultiChoice Income 5 in IA are on the MVA Table in Column C for product and D for State and Have a value of MVA in column E ASCODE I would like a result of Yes brought back to cell AJ2 on the Calculation sheet. If that combo does not have MVA in Column E then No.

    I'm not able to upload the file. Could I send it to your email? I don't see a place for attachements either for pm.

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

    Re: Lookup two Values in Table

    Maybe?

    =IF(Sumproduct(--(MVAProduct='Calculation Sheet'!AI2),--(MVAState='Calculation Sheet'!AH2),--(MVAResults="MVA")),"Yes","No")

+ 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