A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

why this strange result with vlookup



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2010, 07:21 PM posted to microsoft.public.excel.worksheet.functions
Amin
external usenet poster
 
Posts: 181
Default why this strange result with vlookup

hi i have this formula in a cell =VLOOKUP(A3,'LookUp Data'!A2:O740,2,FALSE)
but any time i pick a code from my list items in column A it gives #NA but
as soon as i change to a different code it gives the name.
any help why

  #2  
Old April 22nd, 2010, 07:58 PM posted to microsoft.public.excel.worksheet.functions
Jim Thomlinson
external usenet poster
 
Posts: 2,641
Default why this strange result with vlookup

My best guess would be a data type mismatch. Looking up text in a column of
numbers. When you change the value the type gets converted and the result is
returned.

Hard to say though based on yoru description. The ohter thig to look for
might be blank characters padded at the end of the input.
--
HTH...

Jim Thomlinson


"Amin" wrote:

hi i have this formula in a cell =VLOOKUP(A3,'LookUp Data'!A2:O740,2,FALSE)
but any time i pick a code from my list items in column A it gives #NA but
as soon as i change to a different code it gives the name.
any help why

  #3  
Old April 22nd, 2010, 08:35 PM posted to microsoft.public.excel.worksheet.functions
Dave Peterson
external usenet poster
 
Posts: 19,791
Default why this strange result with vlookup

Any chance that your values are text and you're trying to match a number -- or
your values are numbers and you're trying to match text.

'123
is different from
123

And changing the format of the cell isn't sufficient to fix the problem.

Or maybe you have extra spaces in some of the entries????

Debra Dalgleish has lots of notes on troubleshooting =vlookup():
http://contextures.com/xlFunctions02.html#Trouble

Amin wrote:

hi i have this formula in a cell =VLOOKUP(A3,'LookUp Data'!A2:O740,2,FALSE)
but any time i pick a code from my list items in column A it gives #NA but
as soon as i change to a different code it gives the name.
any help why


--

Dave Peterson
  #4  
Old April 23rd, 2010, 12:16 AM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
Default why this strange result with vlookup

Try swing it to a text match:
=VLOOKUP(A3&"",'LookUp Data'!A2:O740,2,FALSE)
The &"" bit will convert the lookup value in A3 (which might be a real
number) into text for consistent matching, w/o impacting text lookup value.
--
Max
Singapore
---
"Amin" wrote:
hi i have this formula in a cell =VLOOKUP(A3,'LookUp Data'!A2:O740,2,FALSE)
but any time i pick a code from my list items in column A it gives #NA but
as soon as i change to a different code it gives the name.
any help why

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.