+ Reply to Thread
Results 1 to 7 of 7

vlookup with two tables

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question vlookup with two tables

    I am trying to write a formula that basically says that if cell E2 = "single" then do a VLOOKUP for E1 on table array B2:C9 with column index of 1 and exact match and if cell E2 does not equal "single" then do a VLOOKUP for E1 on table array B12:C19 with column index of 1 and exact match.

    Is this possible? I've been playing around for a while and can't seem to figure it out.

    Thanks!
    Last edited by klp1234; 01-07-2014 at 10:08 PM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: vlookup with two tables

    welcome to the forum, klp. question
    why do you range up 2 columns (B:C) when you only want a column index of 1?

    if E1 is the lookup_value, a column index of 1 means it looks for E1 in B2:B9 & return the results in B2:B9. and of course, that's E1. so you don't even need a VLOOKUP. a VLOOKUP makes more sense if you want to return a column index of 2. so it looks for E1 in B2:B9 & returns the result of the row in Column C where E1 is found

    so without understanding the whole picture, i'll just give you what you ask for:
    =VLOOKUP(E1,IF(E2="Single",$B$2:$C$9,$B$12:$C$19),1,0)

    a sample excel file depicting your results is always more than welcome.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    01-07-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: vlookup with two tables

    The tables I am trying to use are typed below. I was using two columns because E1 will be within range- Column B is the minimum and C is the maximum..Maybe I don't have to do that. When the appropriate range is found, I want to return the value that is listed in column B. For example, if E2= "singe" and E1=10,000, I would like to get $2200. However, if E2 does not equal "single", I would like to get $8300.

    First Table...
    For "Single" Status
    Column B Column C
    $0.00 $2,200.00
    $2,200.00 $11,125.00
    $11,125.00 $38,450.00
    $38,450.00 $90,050.00
    $90,050.00 $185,450.00
    $185,450.00 $400,550.00
    $400,550.00 $402,200.00
    $402,200.00

    Second Table...
    For Not "Single" Status
    Column B Column C
    $0.00 $8,300.00
    $8,300.00 $26,150.00
    $26,150.00 $80,800.00
    $80,800.00 $154,700.00
    $154,700.00 $231,350.00
    $231,350.00 $406,650.00
    $406,650.00 $458,300.00
    $458,300.00

    Thanks!

  4. #4
    Registered User
    Join Date
    01-07-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: vlookup with two tables

    In order to upload it I had to rearrange/delete some information from the spreadsheet since it was a huge file. The cells and ranges have changed. Now I am trying to lookup B11 from the first table if E1=Single and from the second table if it does not equal "single". The amount listed in cell D8:D14 or D17:D24 will hopefully be returned in B12.
    Attached Files Attached Files

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: vlookup with two tables

    ok, then you shouldn't be using exact match. you can omit the 0, put TRUE or 1.
    =VLOOKUP(B11,IF(E2="Single",D7:D14,D17:D24),1)

    this works too:
    =LOOKUP(B11,IF(E2="Single",D7:D14,D17:D24))

    just to help you in future postings, add the info in post #3 in the file where you mentioned about the desired results:
    For example, if E2= "singe" and E1=10,000, I would like to get $2200. However, if E2 does not equal "single", I would like to get $8300.
    your file is a great eg, with all the highlighting for us to focus on

  6. #6
    Registered User
    Join Date
    01-07-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: vlookup with two tables

    Thank you so much for your help!

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: vlookup with two tables

    isn't that bracket supposed to be percentage of with respect to Federal Tax Brackets? we'll i'm half around the globe so don't seem to understand it.
    10%
    15%
    25%
    28%
    33%
    35%
    39.60%
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Vlookup with two tables?
    By hydraonstimpac in forum Excel General
    Replies: 7
    Last Post: 02-12-2012, 07:54 PM
  2. Replies: 5
    Last Post: 01-06-2011, 11:20 AM
  3. Vlookup on Tables
    By TazDevil519 in forum Excel General
    Replies: 6
    Last Post: 10-26-2010, 01:48 PM
  4. Vlookup of 2 tables
    By siulonbow in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-08-2010, 12:47 PM
  5. [SOLVED] VLOOKUP with TABLES
    By Serge in forum Excel General
    Replies: 8
    Last Post: 04-28-2006, 12:55 AM

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