VLookup, multiple worksheets


I would like to grab numbers from column B in sheet1, find them on column B in sheet2, and report back the corresponding value in column D in sheet 2 to column C of sheet1.

Here is what I have been playing with in column C of row 25 on sheet1. Excel tells me there is an error, but I can't find what it is!

One more thing, columns A and C in sheet2 are hidden, so I don't know whether the 4 in my formula should be a 2 or not.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
It should be 3.

For the range $B$2:$D$40000 column B is 1, C is 2 and D is 3.
KaressaAuthor Commented:
Thanks very much! I changed it to 3.

Now just need to find where the error is coming from.
Saqib Husain, SyedEngineerCommented:
What error are you getting?
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Saqib Husain, SyedEngineerCommented:
Does your system use semicolons as an separator or should it be a comma?
KaressaAuthor Commented:
You were right about that - the system required commas.

The error changed with the commas. I get #N/A now if I use:


But if I put in the actual value for B24410, which is 1557, the function works!

So there's something wrong with the $B$24410 part of the function?
KaressaAuthor Commented:
Even when I take out the $ from the B24410 part it still doesn't work.
Saqib Husain, SyedEngineerCommented:
You need to make sure that the value in the cell B22410 is "exactly" then same as it looks. I mean extra spaces before, after or within the text.
KaressaAuthor Commented:
If I use the value in the cell (1557) it works. If I use the cell name (B22410) it doesn't.

Unfortunately, I need to find a way to use the cell name so I can copy the formula across cells.
KaressaAuthor Commented:
This is how the formula looks, with the cell being B1 for simplicity and the return being NA:


If I make it look like this, with the value of B1, it works.

Saqib Husain, SyedEngineerCommented:
Did you try re-entering the value in the cell B22410?

If it still does not work can you post your file with only this data there so that the problem can be sorted out?
Saqib Husain, SyedEngineerCommented:
Also try this formula

KaressaAuthor Commented:
Here's a modified sample file with the formula in C1 of sheet1.

Thanks so much for your time on this.
Saqib Husain, SyedEngineerCommented:
Cannot see the file.
KaressaAuthor Commented:
Saqib Husain, SyedEngineerCommented:
The problem is that the numbers on sheet1 are text and not numbers whereas those on locationList are numbers. You can check this if you enter a formula like

=cell("Type",b1) for sheet1  and
=cell("Type",b1) for locationList

To correct this you can select cell b1 on sheet1, press F2 and then press Enter.

You can also modify the formula to take care of this


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KaressaAuthor Commented:
Perfect. Wish I could give you more than 500 points. Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.