+ Reply to Thread
Results 1 to 10 of 10

VLOOKUP...bug?

Hybrid View

  1. #1
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    VLOOKUP...bug?

    I know its not possible that I've found a bug and I'm doing something wrong, but can someone please explain this odd behavior to me...

    I am using vlookup in the following way:

    =VLOOKUP(0.5+0.1,V17:W17,2,FALSE)

    with the 0.6 in the first column, this works fine...however, if i put 0.8 in the first column and use:

    =VLOOKUP(0.7+0.1,V17:W17,2,FALSE)

    I get a value not available error. So it works for most numbers, but just not some. I've tested it on the same one row table to ensure thats its not a formatting issue. Anyone know why it would work inconsistently in this situation? I'm using 2007. Thanks in advance.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: VLOOKUP...bug?

    Hard to say without seeing the true values in your lookup table. Can you post a workbook?

  3. #3
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: VLOOKUP...bug?

    Hi
    Bu it works for me. See sample. Please upload your own....
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  4. #4
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: VLOOKUP...bug?

    Thank you both for taking time to have a look. I've attached the sheet, its occuring throughout certain cells in the "frequency" column depending on the value, but see cell V19 for a simple example.
    Attached Files Attached Files

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: VLOOKUP...bug?

    Hah, Vusal! you've calculated the 0.8 value. Try to hard code 0.8 into cell A8 and see.

    JohnnyB, I confirm that this is odd. I could re-create it in both 2003 and 2010. I suspect it has to do with the floating point bug that has haunted Excel for quite a while.

    see http://www.microsoft.com/communities...&cr=&sloc=&p=1
    Last edited by teylyn; 02-27-2010 at 03:00 AM.

  6. #6
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: VLOOKUP...bug?

    Ahh...so I'm not crazy...thanks for that info. I guess I'll just use calculated values as well. Thanks again guys.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,977

    Re: VLOOKUP...bug?

    I saw very similar behavior in another thread on this board that I considered likely to be a bug. The VLOOKUP was seeking a value entered as a constant in a cell, and was failing to find the same value in a table. The value in the table was calculated and was an exact value that matched the constant value, yet VLOOKUP failed to match it. So a bug is not unthinkable.

    I was unaware of a known floating point bug, thanks for the link.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  8. #8
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: VLOOKUP...bug?

    While this post is open, I might as well ask a related question that I can't seem to figure out. Is there a way with VLOOKUP or MATCH (or any other function(s)) to return the smallest value that is larger than the lookup value when using an ascending list?

    For example, if my lookup array contains (the two lines skipped between 3 & 7 represent cells containing "" )...

    1
    3


    7
    8
    10

    13

    and I use 5 as my lookup value, I'd like to get 7 as the result, not 3 (or blank). Any thoughts?
    Last edited by JonnyB; 02-27-2010 at 01:28 PM. Reason: Edit to demonstrate spaces in list

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: VLOOKUP...bug?

    =INDEX(A1:A9, MATCH(TRUE, A1:A9>5, 0)), array-entered.
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Registered User
    Join Date
    02-12-2010
    Location
    Little Rock, Arkansas
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: VLOOKUP...bug?

    Perfect...thank you shg.

+ 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