Link to home
Start Free TrialLog in
Avatar of Karessa
Karessa

asked on

VLookup, multiple worksheets

Hello.

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.

=VLOOKUP($B$25;'Sheet2'!$B$2:$D$40000;4;FALSE)
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

It should be 3.

For the range $B$2:$D$40000 column B is 1, C is 2 and D is 3.
Avatar of Karessa
Karessa

ASKER

Thanks very much! I changed it to 3.

Now just need to find where the error is coming from.
What error are you getting?
Does your system use semicolons as an separator or should it be a comma?
Avatar of Karessa

ASKER

You were right about that - the system required commas.

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

=VLOOKUP($B$24410,Sheet2!$B$2:$D$40000,3,FALSE)

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?
Avatar of Karessa

ASKER

Even when I take out the $ from the B24410 part it still doesn't work.
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.
Avatar of Karessa

ASKER

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.
Avatar of Karessa

ASKER

This is how the formula looks, with the cell being B1 for simplicity and the return being NA:

=VLOOKUP(B1,locationList!$B$2:$D$901,3,FALSE)

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

=VLOOKUP(1557,locationList!$B$2:$D$901,3,FALSE)
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?
Also try this formula

=VLOOKUP(B1&"",locationList!$B$2:$D$901,3,FALSE)
Avatar of Karessa

ASKER

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

Thanks so much for your time on this.
Cannot see the file.
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Karessa

ASKER

Perfect. Wish I could give you more than 500 points. Thanks!