ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Odd problem with LOOKUP (https://www.excelbanter.com/excel-discussion-misc-queries/43460-odd-problem-lookup.html)

no-sweat

Odd problem with LOOKUP
 

I'm having a problem using the LOOKUP function in excel. Its real
simple, its suppose to look up a letter grade, and return the GPA for
it. When it looks up C, it should return 2.0, but it returns 2.7! :eek:


[image: http://i2.photobucket.com/albums/y36/no-sweat/help.jpg]
*note - D5 is where the lookup function is



Code:
--------------------
=VLOOKUP(D3,A1:B11,2)
--------------------
that doesn't work either :(

any ideas?

thanks.


--
no-sweat
------------------------------------------------------------------------
no-sweat's Profile: http://www.excelforum.com/member.php...o&userid=26878
View this thread: http://www.excelforum.com/showthread...hreadid=401133


swatsp0p


When you understand how VLOOKUP works, you will see that, in your
example, 2.7 is the correct response. VLOOKUP searches for the FIRST
occurance of the given value ("C" in this case), which it finds in the
"C+" cell (A6). Because it is not an exact match, it returns the value
in the cell immediately preceding it -- which is 2.7

You can force an EXACT match by altering your formula from:

=VLOOKUP(D3,A1:B11,2).

to:

=VLOOKUP(D3,A1:B11,2,0) or
=VLOOKUP(D3,A1:B11,2,FALSE)
where the '0' or 'FALSE' is the Range_lookup, which is a logical value
that specifies whether you want VLOOKUP to find an exact match or an
approximate match. If TRUE (or '1') or omitted, an approximate match is
returned. In other words, if an exact match is not found, the next
largest value that is less than lookup_value is returned. If FALSE,
VLOOKUP will find an exact match. If one is not found, the error value
#N/A is returned. d from the [I Wrote:
fx
help]

HTH

Bruce[/i]



--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=401133


no-sweat


ahh well they didn't teach me that in class. thanks! :)


--
no-sweat
------------------------------------------------------------------------
no-sweat's Profile: http://www.excelforum.com/member.php...o&userid=26878
View this thread: http://www.excelforum.com/showthread...hreadid=401133



All times are GMT +1. The time now is 12:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com