Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
tbennett
 
Posts: n/a
Default vlookup argument type

I have two instances using vlookup in which I look up the value '1234' in
table array. Vlookup returns #NA in case 1, and the correct result in case
2. In case 1, the value argument is a cell reference to '1234' and has a
TYPE value of 1. In case 2, value is a cell reference to '1234' and has a
TYPE value of 2. The TYPE value in the lookup column of the lookup array is
2.

Is the wrong data type the cause for the #NA result and, if so, how do I
change it? Formatting the lookup value as text doesn't do the trick.
  #2   Report Post  
RagDyer
 
Posts: n/a
Default

Just changing the format to Text doesn't change the value to Text.
You can verify that by using your Type() function, can't you?

BUT, if you select the "number" cell *after* changing it to Text, hit <F2,
then <Enter, you'll see that the Type() function will return a "2".

You could do this to all your values, going either way, all to Text, or all
to a Number.

Just how many would you have to change?

I would say that if the data looks like numbers, it'd probably be wiser to
make them all numbers.

You could select a new, unused cell, that has the default format of
"General", and right click in it and choose "Copy".
Select all your numbers that are, or might be Text, and right click in that
selection.
Choose "Paste Special", and click on "Add", then <OK.

Now, all your values are true numbers, and all your formulas should work.

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"tbennett" wrote in message
...
I have two instances using vlookup in which I look up the value '1234' in
table array. Vlookup returns #NA in case 1, and the correct result in

case
2. In case 1, the value argument is a cell reference to '1234' and has a
TYPE value of 1. In case 2, value is a cell reference to '1234' and has a
TYPE value of 2. The TYPE value in the lookup column of the lookup array

is
2.

Is the wrong data type the cause for the #NA result and, if so, how do I
change it? Formatting the lookup value as text doesn't do the trick.


  #3   Report Post  
tbennett
 
Posts: n/a
Default

Thanks. I changed the type successfully per your advice, yet the vlookup
still returns #NA. Perhaps it's not the data type afterall. When I copy the
value from the lookup array into the cell containing the lookup value, the
lookup works. Are there other hidden attributes of the cell that affect the
success of vlookup?

"RagDyer" wrote:

Just changing the format to Text doesn't change the value to Text.
You can verify that by using your Type() function, can't you?

BUT, if you select the "number" cell *after* changing it to Text, hit <F2,
then <Enter, you'll see that the Type() function will return a "2".

You could do this to all your values, going either way, all to Text, or all
to a Number.

Just how many would you have to change?

I would say that if the data looks like numbers, it'd probably be wiser to
make them all numbers.

You could select a new, unused cell, that has the default format of
"General", and right click in it and choose "Copy".
Select all your numbers that are, or might be Text, and right click in that
selection.
Choose "Paste Special", and click on "Add", then <OK.

Now, all your values are true numbers, and all your formulas should work.

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"tbennett" wrote in message
...
I have two instances using vlookup in which I look up the value '1234' in
table array. Vlookup returns #NA in case 1, and the correct result in

case
2. In case 1, the value argument is a cell reference to '1234' and has a
TYPE value of 1. In case 2, value is a cell reference to '1234' and has a
TYPE value of 2. The TYPE value in the lookup column of the lookup array

is
2.

Is the wrong data type the cause for the #NA result and, if so, how do I
change it? Formatting the lookup value as text doesn't do the trick.



  #4   Report Post  
RagDyer
 
Posts: n/a
Default

Are you saying that all your data is now *verified* as being numeric and
you're still having this problem?

AFAIK, if a value is numeric, there cannot be any invisible, imbedded
characters in the cell, otherwise it would be converted to text.

Double check some of your problem cells and make double sure that they *are*
all numeric.

Try using
=ISNUMBER()
and make sure everything equates to TRUE!
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"tbennett" wrote in message
...
Thanks. I changed the type successfully per your advice, yet the vlookup
still returns #NA. Perhaps it's not the data type afterall. When I copy

the
value from the lookup array into the cell containing the lookup value, the
lookup works. Are there other hidden attributes of the cell that affect

the
success of vlookup?

"RagDyer" wrote:

Just changing the format to Text doesn't change the value to Text.
You can verify that by using your Type() function, can't you?

BUT, if you select the "number" cell *after* changing it to Text, hit

<F2,
then <Enter, you'll see that the Type() function will return a "2".

You could do this to all your values, going either way, all to Text, or

all
to a Number.

Just how many would you have to change?

I would say that if the data looks like numbers, it'd probably be wiser

to
make them all numbers.

You could select a new, unused cell, that has the default format of
"General", and right click in it and choose "Copy".
Select all your numbers that are, or might be Text, and right click in

that
selection.
Choose "Paste Special", and click on "Add", then <OK.

Now, all your values are true numbers, and all your formulas should

work.

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"tbennett" wrote in message
...
I have two instances using vlookup in which I look up the value '1234'

in
table array. Vlookup returns #NA in case 1, and the correct result in

case
2. In case 1, the value argument is a cell reference to '1234' and

has a
TYPE value of 1. In case 2, value is a cell reference to '1234' and

has a
TYPE value of 2. The TYPE value in the lookup column of the lookup

array
is
2.

Is the wrong data type the cause for the #NA result and, if so, how do

I
change it? Formatting the lookup value as text doesn't do the trick.




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 Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
read in Vlookup an argument that has quotations(") carlosgdlf Excel Discussion (Misc queries) 1 August 2nd 05 05:56 PM
VLOOKUP: type or paste values Rochelle Excel Worksheet Functions 5 April 8th 05 03:23 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 02:04 PM.

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"