VLOOKUP...

K

KimberlyC

Hi,
In my active worksheet, I am using the following formula in cell A10
=IF('Adjustments'!A10="","",'Adjustments'!A10)
If there is data in cell A10 of the Adjustments worksheet, then it puts the
data from the Adjustments worksheet into cell A10 of the active
worksheet....if no data is entered in cell A10 of the Adjustments worksheet,
then cell A10 of the active worksheet is blank. ( the data (if any) in cell
A10 of the Adjustments worksheet is a 4 digit code for ex.. 0010)

This is working fine..

However, I'm now trying to use the VLOOKUP fucntion in cell B10 of the
active worksheet..to lookup the description of the code in cell A10 of the
active worksheet. The description is located in another worksheet called
Desc.xls .....I'm using this formula:
=VLOOKUP(A10,Desc.xls!$A$2:$B$1124,2,FALSE)

(The Desc.xls worksheet is opened)

The Formula retruns #NA in cell B10.

If I type over the formula in cell A10 of the active worksheet ...(entering
the code that the formula had there).....then I get the correct description
for the code that is in the Desc.xls file.

It appears the VLOOLUP function doesn't like to lookup data that was
generated by a formula.....
but if I enter the code into the cell....it works perefectly.

Is there a way to make this work with the formula in A10??

Thanks in advance for your help...
Kimberly
 
A

Aladin Akyurek

That probably happens because the data type of A10 and the data type of
Desc.xls!$A$2:$A$1124 are not the same: number vs text or other way
around for example. Try to align their data types.
 
K

KimberlyC

Thanks for the help!
I changed the all the cells (Desc.xls, Activeworksheet, and the Adjustments
worksheet) to Text Format and it still doesn't work.
 
K

KimberlyC

I found the problem...
The the code from the Adj. ws was referencing another worksheet via a
formula...and when I formated the "other" worksheet to Text..it worked!!
Thanks again!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top