Avatar of jspc
jspc
Flag for Australia asked on

V-Lookup

Hello,

I'm wondering if someone can please help me with a VLOOKUP in an Excel File?

I have 2 datasheets. Stock and Datasource.

I'm trying to reference the Sheet Stock Column J to the Sheet Datasource column b

Please see attached example.
STOCKFINAL.xlsx
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Roy Cox

8/22/2022 - Mon
Rgonzo1971

Hi,

pls try
=VLOOKUP(A2,A1Range,2,0)

Open in new window

the first 2 cells in Datasource are text. pls convert to number to work

Regards
jspc

ASKER
I'm getting #N/A

I have converted to number
Rgonzo1971

Na where is no corresponding reference
STOCKFINALv1.xlsx
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Roy Cox

For convenience of writing the formula I have converted the lookup table to a Table.

The formula is then =VLOOKUP(A2,Table1[#All],2,0)

However, your codes do not seem to match. See the result when I type in a dummy code - Test1
STOCKFIN-1-AL.xlsx
ASKER CERTIFIED SOLUTION
Rgonzo1971

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Roy Cox

I have added IFERROR to show if a code is missing.
jspc

ASKER
Thank you, however if I copy your change down it doesn't reference the barcode number in the Datasource sheet
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Roy Cox

Forgot the last attachment
STOCKFIN-1-AL.xlsx
jspc

ASKER
Thank you
Shums Faruk

Even this question is closed. Another approach would be to use:
=IFERROR(INDEX(DataSource!B:B,MATCH(A2,DataSource!A:A)),"")

Open in new window

Please find attached...
STOCKFINAL_v1.xlsx
Your help has saved me hundreds of hours of internet surfing.
fblack61
Roy Cox

The codes are definitely different, see the effect of matching codes from the main table with the Lookup Table, cells highlighted in yellow, the formula works
STOCKFIN-1-AL.xlsx