+ Reply to Thread
Results 1 to 7 of 7

Percentage Vlookup Returning Error / Incorrect Values

  1. #1
    Registered User
    Join Date
    09-13-2021
    Location
    New York, NY
    MS-Off Ver
    365
    Posts
    3

    Percentage Vlookup Returning Error / Incorrect Values

    Hey everyone - been trying to work through this issue and has been driving me crazy!

    In the attached excel, I'm trying to Vlookup a percentage value against a table, where using approximate range lookup returns an incorrect value and exact range lookup returns error.

    The issue is all these percentages are round numbers and the lookup works for a select few values (e.g., 8% works, but not 6%). However, if I go to B10 or I10 and manually enter "6%" it works -- it's extremely strange.

    Let me know what's going on here! Been at it all night and it's driving me insane.

    Thanks!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-03-2021
    Location
    South Carolina
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Percentage Vlookup Returning Error / Incorrect Values

    i can't remember the last time I used VLOOKUP. Use INDEX and MATCH and with MATCH, use 1 in the MATCH Type so it returns the value less than or equal to the percentage you're looking up.
    Example formula:
    =INDEX(C$5:C$30,MATCH(E7,B$5:B$30,1))

  3. #3
    Registered User
    Join Date
    09-13-2021
    Location
    New York, NY
    MS-Off Ver
    365
    Posts
    3

    Re: Percentage Vlookup Returning Error / Incorrect Values

    Index match in this case behaves the exact same way. Try it on E5 and it returns an incorrect value ("E" instead of "F")

  4. #4
    Registered User
    Join Date
    09-03-2021
    Location
    South Carolina
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Percentage Vlookup Returning Error / Incorrect Values

    Ah, so this is a data problem, not a formula problem. it is not truly "6%" in the cell. There is some extraneous and small value causing the formula to return E as 5% is the next closest value that is not greater than the 6% lookup value. Clean up the whole percent column to not include formulas, or round to two decimals in your formula and drag it down and your original formula and mine will both work.

  5. #5
    Registered User
    Join Date
    09-13-2021
    Location
    New York, NY
    MS-Off Ver
    365
    Posts
    3

    Re: Percentage Vlookup Returning Error / Incorrect Values

    Thanks - if you look at the sheet though, I have a version to the right with hardcoded numbers and it behaves the same way. It's only when I go to 6% and hit F2 > Enter that it works...

  6. #6
    Registered User
    Join Date
    09-03-2021
    Location
    South Carolina
    MS-Off Ver
    Office 365
    Posts
    7
    Quote Originally Posted by piepod View Post
    Thanks - if you look at the sheet though, I have a version to the right with hardcoded numbers and it behaves the same way. It's only when I go to 6% and hit F2 > Enter that it works...
    I’m assuming the hard coded numbers were copied and pasted from your formula output as values and formatting only. Again, if you round your formula and drag it down, then you copy and paste your newly rounded values, it will work.

  7. #7
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: Percentage Vlookup Returning Error / Incorrect Values

    Quote Originally Posted by josephcj68 View Post
    I'm assuming the hard coded numbers were copied and pasted from your formula output as values
    .... Which we can be confirmed by entering =MATCH(B5,I5,0) into K5 and copying down the column.

    The result of 1 confirms that columns B and I have the same binary values.

    As to josephcj68's original assumption (infinitesimal differences due to unrounded arithmetic in column B), that can be confirmed by entering =SUM(B5,-(B5 & "")) into K5 and copying down the column. Format as General or Scientific.

    (B5&"" is the value in B5 rounded to up to 15 significant digits, the most precision that Excel formats. Note that =B5-(B5 & "") does not always return the infinitesimal difference because of games that Excel plays in order to hide such differences. Sigh.)

    We see that B10 is infinitesimally larger than (the binary approximation of) 6%. Consequently, VLOOKUP(6%,B5:C30,2,TRUE) returns the value in C9, corresponding to B9, "the largest value less than or equal to" 6%.

    In contrast, we see that B14 is infinitesimally less than 10%. Consequently, VLOOKUP(10%,B5:C30,2,TRUE) correctly returns the value in C14, but only by coincidence.

    "Re-entering" I10 by pressing F2, then Enter corrects the problem because Excel enters what we see in the Formula Bar. Since the FB shows only up to 15 significant digits, it "corrects" the infinitesimal difference.
    Last edited by curiouscat408; 09-14-2021 at 11:27 AM.

+ 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. [SOLVED] Vlookup returning incorrect results
    By Informer1111 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-25-2021, 12:00 PM
  2. [SOLVED] Vlookup returning incorrect values in some instnces
    By Howardc1001 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-06-2020, 02:30 AM
  3. Vlookup returning incorrect information
    By Ghost Of Casper in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-10-2013, 12:45 PM
  4. [SOLVED] VLOOKUP returning incorrect results
    By Jennsy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 03:08 PM
  5. VLookup returning incorrect values?
    By hijinxx in forum Excel General
    Replies: 3
    Last Post: 05-24-2012, 05:47 AM
  6. VLOOKUP and MATCH returning incorrect values
    By -Spax- in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 10-10-2011, 07:03 AM
  7. VLOOKUP returning incorrect values for unfound match
    By scaffdog845 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-15-2010, 01:30 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