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  dBforums > PC based Database Applications > Microsoft Excel > Inconsistent results from VLOOKUP??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-05, 11:40
Ariel Wary Ariel Wary is offline
Registered User
 
Join Date: Mar 2005
Posts: 1
Inconsistent results from VLOOKUP??

I have used Excel for some years, but now I am in front of something I can't manage,
I have a plain database, and I look up there some info with the VLOOKUP. I get for some references the desired info, but for some others I reveive #N/A.
Obviously, I confirmed that the info is there indeed, and in the same format, and copied data between lines, and still I get the damned #N/A.
I couldnt find anything different between a line that works and one that not works.
I isolated the non working formulas and I can't find nothing wrong.
I am even more frustrated because among my friends and workmates I am the "Excel guy", and I this problem is becoming a sort of personal challenge.
If you are willing to give me a hand I can send you my XLS file, which has no macros and no references to other files. Anyway it is here available in a ZIP file.

I really thank you very much
Attached Files
File Type: zip Book7.zip (8.0 KB, 34 views)
Reply With Quote
  #2 (permalink)  
Old 03-02-05, 12:23
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
Not a very good answer here but if you test out a few of your values you will notice that the vlookup works with some and not with others

if you change the range lookup to true then the answers come back without a problem

this leads me to believe that excel isnt storing your numbers exactly but probabbly storing them like this 134.0000000000000000001 is equivalent to 134 etc,

But this is just a guesss
Dave
Reply With Quote
  #3 (permalink)  
Old 03-02-05, 13:31
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
I agree with Dave. I played with the data and formulas for a while, and found the same thing.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #4 (permalink)  
Old 03-02-05, 19:21
SR22Mike SR22Mike is offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA, Earth
Posts: 65
TRUNC or ROUND

Since the data in the first column of the array is a calculation, I would suggest doing something like...

=TRUNC(B2*100)
or
=ROUND(B2*100,0)

I tested the TRUNC and it seemed to solve the problem with the #N/A errors. These both do the same thing, but use which ever you are more comfortable with using.

If you are not sure that the data is in the array (the normal cause for #N/A errors), then try a formula like...
=If(ISERROR(VLOOKUP([your data here])),0,VLOOKUP([your data here])).

It doubles the number of vlookup calculations, but gets filters out the #N/A errors.

Good Luck!
Mike
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On