+ Reply to Thread
Results 1 to 4 of 4

Find more than specific integer in vlookup

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Find more than specific integer in vlookup

    Hi,

    i have worksheet like here:

    Screenshot_18.png

    user is choosing number in yellow fiekd and cost is calculated in column J (where N/A in the screen is). In column J there is a vlookup formula.
    The issue is when i have more than 128, like for example 256 choosen, i am getting "N/A" because there is no matchin row in lookup table.

    In source table there is no 256 in key, there is only 128 with "+" like here:
    Screenshot_19.png

    Vlookup or different formula should know that when we have + next to number it can be 128 and more as match.

    Example workbook in attachment like always.

    Please help,
    Jacek
    Attached Files Attached Files
    Last edited by jaryszek; 11-05-2019 at 11:10 AM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,808

    Re: Find more than specific integer in vlookup

    I notice that you are using an exact match lookup (4th argument of VLOOKUP() is FALSE/0). What you are describing could be accomplished using an approximate match lookup (4th argument of VLOOKUP() is TRUE/1/omitted). The challenge will be thinking through your "text-number" type lookup values and understanding exactly how to build those text strings so that they can be reliably sorted and searched. For example, with the 3 example records, you could maybe do
    Please Login or Register  to view this content.
    Then edit your existing VLOOKUP() formula to something like =VLOOKUP("Windows-"&TEXT(C3,"000"),Table1,3,TRUE). 3 digit numbers (leading 0s as needed) are used to insure that the search works correctly for numbers up to 999 (Excel will see it as a pure text sort order and not really see the numbers).

    For the oversimplified example you have provided, that should work. You will need to think carefully about exactly how to put together the text strings so they work correctly in your actual sheet, but the idea would still be the same.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    11-05-2019
    Location
    Kuala Lumpur
    MS-Off Ver
    365
    Posts
    3

    Re: Find more than specific integer in vlookup

    I adjusted your example to use a sumif function instead, source table is adjusted to include a product name " Windows" and a lower and upper bound for which the price applies
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Find more than specific integer in vlookup

    thank you very much!!

    I prefer RodyaRaskol solution - is very clean. I would put as Upper bound thesame number like in LB , for example 5 and 5 and change formula to:

    Please Login or Register  to view this content.
    MrShorty your solution is nice also.

    Best,
    Jacek

+ 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. Replies: 5
    Last Post: 08-05-2019, 07:22 PM
  2. [SOLVED] Find a specific text and vlookup
    By oozden in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2014, 08:24 AM
  3. Integer to a few specific lookup values
    By danseq in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2013, 01:03 AM
  4. Rounding to a specific integer using formulas
    By doug@bunchesofbows in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2012, 12:31 PM
  5. [SOLVED] Finding a specific integer in a string
    By bugmenot in forum Excel General
    Replies: 9
    Last Post: 08-03-2009, 01:58 PM
  6. Replies: 2
    Last Post: 01-26-2009, 07:59 PM
  7. Roundup To A Specific Integer
    By SAD821 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2007, 11:08 PM

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