Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default An #N/A returns in Vlookup formula

For simplicity, I have the following vlookup formula listed below, where the
first number would be in cell A3 and the range I'm trying to find the number
is in cell A5:B5, and the result is in C5. However, I keep getting an #N/A
for my response. I have formatted the entire worksheet and all numbers as a
number and not text. This only happens to several rows in my hugh spreadheet.
The other formulas work. Any idea why this is happening to these several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default An #N/A returns in Vlookup formula

The data is likely not a match, regardless of what you think you are seeing.
Easy test is to find the entry you are looking up (Assume cell B2) and then
find where you think the matching cell is (Assume H99), and then in any
other cell put =B2=H99 and see if you get TRUE or FALSE as a result. If it
doesn't match, then use =ISNUMBER or =ISTEXT on each to see if they really
are what you thought they were.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




"Mike" wrote in message
...
For simplicity, I have the following vlookup formula listed below, where
the
first number would be in cell A3 and the range I'm trying to find the
number
is in cell A5:B5, and the result is in C5. However, I keep getting an
#N/A
for my response. I have formatted the entire worksheet and all numbers as
a
number and not text. This only happens to several rows in my hugh
spreadheet.
The other formulas work. Any idea why this is happening to these several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 791
Default An #N/A returns in Vlookup formula

Two things come to mind:
1.- The lookup table must be sorted by the left most column; therefore I
would try sorting
2.- If there is a blank space after 63311 or before it, the lookup will
fail, what I usually do is:
=Vlookup(Trim(A3),$A$5:$B$5,2,FALSE)

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Mike" wrote:

For simplicity, I have the following vlookup formula listed below, where the
first number would be in cell A3 and the range I'm trying to find the number
is in cell A5:B5, and the result is in C5. However, I keep getting an #N/A
for my response. I have formatted the entire worksheet and all numbers as a
number and not text. This only happens to several rows in my hugh spreadheet.
The other formulas work. Any idea why this is happening to these several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default An #N/A returns in Vlookup formula

1.- The lookup table must be sorted by the left most column; therefore I
would try sorting


Not if as per the Ops and your own example, the optional argument of FALSE
or 0 is included at the end of the formula.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




"Michael" wrote in message
...
Two things come to mind:
1.- The lookup table must be sorted by the left most column; therefore I
would try sorting
2.- If there is a blank space after 63311 or before it, the lookup will
fail, what I usually do is:
=Vlookup(Trim(A3),$A$5:$B$5,2,FALSE)

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Mike" wrote:

For simplicity, I have the following vlookup formula listed below, where
the
first number would be in cell A3 and the range I'm trying to find the
number
is in cell A5:B5, and the result is in C5. However, I keep getting an
#N/A
for my response. I have formatted the entire worksheet and all numbers
as a
number and not text. This only happens to several rows in my hugh
spreadheet.
The other formulas work. Any idea why this is happening to these
several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 791
Default An #N/A returns in Vlookup formula

If you read the first paragraph of the Arguments window (while inserting the
function using the insert formula option), it clearly states that by default
the table must be sorted in ascending order.
On the range lookup argument, the false is used to return an exact match.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Ken Wright" wrote:

1.- The lookup table must be sorted by the left most column; therefore I
would try sorting


Not if as per the Ops and your own example, the optional argument of FALSE
or 0 is included at the end of the formula.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------Â*------------------------------Â*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------Â*------------------------------Â*----------------




"Michael" wrote in message
...
Two things come to mind:
1.- The lookup table must be sorted by the left most column; therefore I
would try sorting
2.- If there is a blank space after 63311 or before it, the lookup will
fail, what I usually do is:
=Vlookup(Trim(A3),$A$5:$B$5,2,FALSE)

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Mike" wrote:

For simplicity, I have the following vlookup formula listed below, where
the
first number would be in cell A3 and the range I'm trying to find the
number
is in cell A5:B5, and the result is in C5. However, I keep getting an
#N/A
for my response. I have formatted the entire worksheet and all numbers
as a
number and not text. This only happens to several rows in my hugh
spreadheet.
The other formulas work. Any idea why this is happening to these
several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default An #N/A returns in Vlookup formula

You are wrong, read help. When VLOOKUP looks for an exact match there is no
need
to sort anything. Since the OP used FALSE in his formula the reason he gets
an error is simply a mismatch. Leading/trailing spaces, hidden html
characters or numbers formatted as text.



--
Regards,

Peo Sjoblom




"Michael" wrote in message
...
If you read the first paragraph of the Arguments window (while inserting
the
function using the insert formula option), it clearly states that by
default
the table must be sorted in ascending order.
On the range lookup argument, the false is used to return an exact match.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Ken Wright" wrote:

1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting


Not if as per the Ops and your own example, the optional argument of
FALSE
or 0 is included at the end of the formula.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




"Michael" wrote in message
...
Two things come to mind:
1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting
2.- If there is a blank space after 63311 or before it, the lookup will
fail, what I usually do is:
=Vlookup(Trim(A3),$A$5:$B$5,2,FALSE)

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Mike" wrote:

For simplicity, I have the following vlookup formula listed below,
where
the
first number would be in cell A3 and the range I'm trying to find the
number
is in cell A5:B5, and the result is in C5. However, I keep getting an
#N/A
for my response. I have formatted the entire worksheet and all
numbers
as a
number and not text. This only happens to several rows in my hugh
spreadheet.
The other formulas work. Any idea why this is happening to these
several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 149
Default An #N/A returns in Vlookup formula

Yes, False is used to return an exact match.

But Sorted data is only required when looking for an *approximate* match
(which the OP is not doing).

(When looking for an exact match, why would Excel need the data need to be
sorted? It either finds it or it doesn't).

by default the table must be sorted in ascending order.

Yep, but that's because True is the default for RangeLookup. Once you change
RangeLooku to False, the "default" sort-order rule no longer applies.

HTH,


"Michael" wrote in message
...
If you read the first paragraph of the Arguments window (while inserting
the
function using the insert formula option), it clearly states that by
default
the table must be sorted in ascending order.
On the range lookup argument, the false is used to return an exact match.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Ken Wright" wrote:

1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting


Not if as per the Ops and your own example, the optional argument of
FALSE
or 0 is included at the end of the formula.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




"Michael" wrote in message
...
Two things come to mind:
1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting
2.- If there is a blank space after 63311 or before it, the lookup will
fail, what I usually do is:
=Vlookup(Trim(A3),$A$5:$B$5,2,FALSE)

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Mike" wrote:

For simplicity, I have the following vlookup formula listed below,
where
the
first number would be in cell A3 and the range I'm trying to find the
number
is in cell A5:B5, and the result is in C5. However, I keep getting an
#N/A
for my response. I have formatted the entire worksheet and all
numbers
as a
number and not text. This only happens to several rows in my hugh
spreadheet.
The other formulas work. Any idea why this is happening to these
several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default An #N/A returns in Vlookup formula

Hey stranger, hope all's well with you [ and couldn't have said it better
myself :-) ]

Best Wishes
ken....................


"Peo Sjoblom" wrote in message
...
You are wrong, read help. When VLOOKUP looks for an exact match there is
no need
to sort anything. Since the OP used FALSE in his formula the reason he
gets an error is simply a mismatch. Leading/trailing spaces, hidden html
characters or numbers formatted as text.



--
Regards,

Peo Sjoblom




"Michael" wrote in message
...
If you read the first paragraph of the Arguments window (while inserting
the
function using the insert formula option), it clearly states that by
default
the table must be sorted in ascending order.
On the range lookup argument, the false is used to return an exact match.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Ken Wright" wrote:

1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting

Not if as per the Ops and your own example, the optional argument of
FALSE
or 0 is included at the end of the formula.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




"Michael" wrote in message
...
Two things come to mind:
1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting
2.- If there is a blank space after 63311 or before it, the lookup
will
fail, what I usually do is:
=Vlookup(Trim(A3),$A$5:$B$5,2,FALSE)

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Mike" wrote:

For simplicity, I have the following vlookup formula listed below,
where
the
first number would be in cell A3 and the range I'm trying to find the
number
is in cell A5:B5, and the result is in C5. However, I keep getting
an
#N/A
for my response. I have formatted the entire worksheet and all
numbers
as a
number and not text. This only happens to several rows in my hugh
spreadheet.
The other formulas work. Any idea why this is happening to these
several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike







  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default An #N/A returns in Vlookup formula

Admittedly not all of MS instructions are totally crystal, and do allow for
some interpretation, but in this case it really is exactly as I said.

Same also holds true for functions such as MATCH()

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------



"Michael" wrote in message
...
If you read the first paragraph of the Arguments window (while inserting
the
function using the insert formula option), it clearly states that by
default
the table must be sorted in ascending order.
On the range lookup argument, the false is used to return an exact match.

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Ken Wright" wrote:

1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting


Not if as per the Ops and your own example, the optional argument of
FALSE
or 0 is included at the end of the formula.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




"Michael" wrote in message
...
Two things come to mind:
1.- The lookup table must be sorted by the left most column; therefore
I
would try sorting
2.- If there is a blank space after 63311 or before it, the lookup will
fail, what I usually do is:
=Vlookup(Trim(A3),$A$5:$B$5,2,FALSE)

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Mike" wrote:

For simplicity, I have the following vlookup formula listed below,
where
the
first number would be in cell A3 and the range I'm trying to find the
number
is in cell A5:B5, and the result is in C5. However, I keep getting an
#N/A
for my response. I have formatted the entire worksheet and all
numbers
as a
number and not text. This only happens to several rows in my hugh
spreadheet.
The other formulas work. Any idea why this is happening to these
several
cells?

63311

63311 40813 #N/A =VLOOKUP(A3,$A$5:$B$5,2,FALSE)


Thanks,
Mike






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default An #N/A returns in Vlookup formula

Easiest way to check of course is simply to try it and see

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------




  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default An #N/A returns in Vlookup formula

"Ken Wright" wrote...
Admittedly not all of MS instructions are totally crystal, and do allow
for some interpretation, but in this case it really is exactly as I said.

....

There are even some bit & pieces that are just plain wrong.


  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default An #N/A returns in Vlookup formula

"Michael" wrote...
If you read the first paragraph of the Arguments window (while inserting
the function using the insert formula option), it clearly states that by
default the table must be sorted in ascending order.


And whatcha suppose the 'by default' qualification means? One interpretation
would be when using VLOOKUP with the DEFAULT 4th argument value TRUE. In
that case, the first column needs to be in ascending order or VLOOKUP's
result isn't reliable. (As long as VLOOKUP's 1st argument is equal to or
greater than the topmost value in the 1st column of its 2nd argument,
VLOOKUP will return the corresponding value from the column given by its 3rd
argument.)

On the range lookup argument, the false is used to return an exact match.


Yes, and when using exact matches, so with VLOOKUP's 4th argument FALSE or
0, so NOT the default value, VLOOKUP performs a linear search through the
entire 1st column of its 2nd argument, and in that case that 1st column NEED
NOT BE SORTED.

Further, if there could be multiple instances of the same value in the 1st
column of VLOOKUP's 2nd argument, and one wants to find the 1st/topmost
instance in that column, it's necessary to use exact matching.


  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default An #N/A returns in Vlookup formula

LOL - Say it aint so.........I can't believe such a thing could be true
:-)

Long time no speak, but best wishes from this side of the pond Harlan.

Regards
Ken.....................

"Harlan Grove" wrote in message
...
"Ken Wright" wrote...
Admittedly not all of MS instructions are totally crystal, and do allow
for some interpretation, but in this case it really is exactly as I said.

...

There are even some bit & pieces that are just plain wrong.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup occasionally returns formula with no data Ted Jillett Excel Discussion (Misc queries) 3 August 9th 07 01:48 PM
Vlookup returns #N/A correctly...but...need formula in another col Linda Excel Worksheet Functions 0 July 26th 07 02:54 PM
@vlookup returns the formula instead of the value - why? Barb Excel Worksheet Functions 3 June 5th 06 10:36 PM
VLookup returns #VALUE! BEEJAY Excel Worksheet Functions 2 September 8th 05 02:25 PM
vlookup returns 0.00 steve alcock Links and Linking in Excel 4 May 6th 05 12:47 AM


All times are GMT +1. The time now is 07:37 AM.

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

About Us

"It's about Microsoft Excel"