+ Reply to Thread
Results 1 to 5 of 5

[SORT OF SOLVED]VLOOKUP formula query

  1. #1
    Registered User
    Join Date
    02-28-2008
    Posts
    25

    [SORT OF SOLVED]VLOOKUP formula query

    Hi,

    I have a problem with the VLOOKUP function and i can't work out what is going on. I've attatched file.

    The program keeps track of scores and handicaps in a golf society

    On the members sheet in cell F9, the result should equal 13.2, but the formula throws out 13.0. The final VLOOKUP seems to be the problem. The lookup value is F8(which is 13.4), the table array is named 'calc'(on the tables sheet), and column index number works out to be 3. The figure in column 3 is 13.2, yet it throws out 13.0!

    Any ideas why, it may be staring me in the face but i can't see it
    Attached Files Attached Files
    Last edited by thedaddy; 08-31-2009 at 08:59 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: VLOOKUP formula query

    its a rounding problem
    try
    VLOOKUP(ROUND(F8,2),calc,(E9-ss5)+2,FALSE)
    note you should use the false arguement for exact match if not
    VLOOKUP(ROUND(F8,2),calc,(E9-ss5)+2,true) leaving it of is the same as "true"
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-28-2008
    Posts
    25

    Re: VLOOKUP formula query

    Thanks that works a treat!

    Can you walk me through it as i don't understand why it happened. I've not come across this problem before? Why does rounding f8 to 2 places correct the problem.

    I've never noticed this happen before, is it something to do with this particular cell as it's not happening in similar circumstances on the rest of the sheet??

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: VLOOKUP formula query

    no idea but if you just do a simple vlookup
    VLOOKUP(F8,calc,3,FALSE) you get an error
    replace f8 with its value and it works
    VLOOKUP(13.4,calc,3,FALSE)
    same as
    =MATCH(F8,Tables!J66:J71,0) doesnt worh
    but
    =MATCH(13.4,Tables!J66:J71,0) does
    interestingly tho

    =F8=Tables!J71 returns true which suggests a match

  5. #5
    Registered User
    Join Date
    02-28-2008
    Posts
    25

    Re: VLOOKUP formula query

    Yes, i tried doing the simple VLOOKUP replacing F8 with the true value, and got exactly same answers to you, that's what completely threw me.

    Done a google search and found that if i tick the 'precision as displayed' box in options then it also solves problem. As golf handicaps never go past 1 decimal place having this option ticked should not pose i problem from what i can ascertain

+ 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