+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Nesting VLookup Function or alternative?

  1. #1
    Registered User
    Join Date
    02-25-2011
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2007
    Posts
    2

    Nesting VLookup Function or alternative?

    So I have a sheet where there is an item code in a column... within that item code is a range of zip codes in another column, and next to each zip code is a corresponding price.

    What I am trying to accomplish is to have one cell where you can enter the item code, and another cell where you can enter the zip code, and the appropriate price will show up.

    I have been going crazy trying to nest a vlookup within a vlookup where I can get an exact match to the item code, and a ranged match to the zip code (since we only look at the first three numbers) and have been having zero luck figuring this out.

    I've attached a basic version of the file which should give you an idea.

    Any thoughts?
    Attached Files Attached Files

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

    Re: Nesting VLookup Function or alternative?

    Name each table,

    e.g.

    Select C1:G7 and call it J1_Table (by entering the name in the Name Box to the left of the formula bar).

    Do similar for each table, i.e. J2_Table and J3_Table

    then use formula:

    =LOOKUP(2,1/(INDEX(INDIRECT(J5&"_Table"),0,1)<=K5),INDEX(INDIRECT(J5&"_Table"),0,2))

    copied down
    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
    09-22-2011
    Location
    Washington, USA
    MS-Off Ver
    Excel 2003,2007, 2010
    Posts
    85

    Re: Nesting VLookup Function or alternative?

    Another option...

    This is also another way to overcome SUMIF limitations. you can have an almost infinite number of SUMIF criteria using this method.
    Attached Files Attached Files

+ 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