![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 6
|
I am having a problem using text data with the vlookup function. The lookup value is in text format and the first column of the data range is in text format. If I copy and paste the lookup value into the lookup value cell location, I get #N/A as a result of my vlookup function, even though the lookup value is in the first column of my data range.
If I type the lookup value into the the lookup value cell location, the function works fine. This isn't a solution that I can use, because I have a list of items to lookup and it would take too long to copy and paste the values and retype these values in the same cell. Has anyone encountered this issue before? |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, CO
Posts: 1,744
|
Quote:
formula, using the first value in your look up table, and the value you want to look up? If they are both text, the results should both be false. A real "number" can reside in a cell formatted as text. |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 6
|
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 6
|
The rsults of both isnumber() formulas is false. Does that mean the vlookup function won't work for this data?
|
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=LEN(lookup-value)=LEN(the-same-entry-in-the-first-col-of-the-lookup-table) because of extraneous spaces. |
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Hi jemeyer:
How about if you post some of your sample data, and the formula you are using -- that will be a big help in looking at what you are working with and where is the problem. It appears you may have a syntax problem in using the VLOOKUP function!
__________________
Regards! Yogi Anand, D.Eng, P.E. Energy Efficient Building Network LLC www.energyefficientbuild.com |
|
|
|
|
|
#7 |
|
New Member
Join Date: Mar 2002
Posts: 6
|
The lengths of both values are the same.
|
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
where A1:A10 is the first column range of your lookup-table. What do you get? As Anand suggests, post also your VLOOKUP formula in the follow-up. |
|
|
|
|
|
|
#9 |
|
New Member
Join Date: Mar 2002
Posts: 6
|
Yogi,
Would you rather I sent you the file by email. It is not a very big file. Thanks, John |
|
|
|
|
|
#10 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Yes you can email it to me -- if you like -- or post it on the board! |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|