ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can Vlookup from one spreadsheet and not another (https://www.excelbanter.com/excel-worksheet-functions/67450-can-vlookup-one-spreadsheet-not-another.html)

Melinda

Can Vlookup from one spreadsheet and not another
 
Hello,
I have a simple spread sheet (Quantities) where I'm trying to vlookup a
value (ItemNumber) from another spreadsheet (ItemMaster) to return Units.
The vlookup constantly returns #N/A despite the fact that I can see the
ItemNumber it's supposed to be looking up. I can look up the same ItemNumber
from a different spreadsheet (that holds similar info) with no problem.
Any ideas on what would keep a vlookup from working on ItemMaster only?
Melinda

Kevin Vaughn

Can Vlookup from one spreadsheet and not another
 
Based on your description, I would guess spaces in the value you are trying
to look up (that makes it different than the itemnumber you are looking up.)
You might want to try using trim. I tried the following formula and found
that I needed to make it an array formula to get it to work (entered by
hitting cntl-shift-enter rather than just enter.)

=VLOOKUP(TRIM(K4),TRIM(H4:I5),2,FALSE)

--
Kevin Vaughn


"Melinda" wrote:

Hello,
I have a simple spread sheet (Quantities) where I'm trying to vlookup a
value (ItemNumber) from another spreadsheet (ItemMaster) to return Units.
The vlookup constantly returns #N/A despite the fact that I can see the
ItemNumber it's supposed to be looking up. I can look up the same ItemNumber
from a different spreadsheet (that holds similar info) with no problem.
Any ideas on what would keep a vlookup from working on ItemMaster only?
Melinda


Melinda

Can Vlookup from one spreadsheet and not another
 
Thanks that did it! I had trailing spaces in the table I was looking up
from. I trimmed out the spaces and it worked!
Thanks!
Melinda

"Kevin Vaughn" wrote:

Based on your description, I would guess spaces in the value you are trying
to look up (that makes it different than the itemnumber you are looking up.)
You might want to try using trim. I tried the following formula and found
that I needed to make it an array formula to get it to work (entered by
hitting cntl-shift-enter rather than just enter.)

=VLOOKUP(TRIM(K4),TRIM(H4:I5),2,FALSE)

--
Kevin Vaughn




All times are GMT +1. The time now is 05:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com