Inconsistent behavior using VLOOKUP

A

Andrew

Hello,
I am working on a sheet which sets up contact info based on a list,
such as:

Name.................
Address...........
City, State............
Phone...............

The "Name" cell is a drop down list, tied to data on another sheet.
The other contact cells are activated using a VLOOKUP function. I use
the following code in the "Address" box

=VLOOKUP(C12,vendors!A1:L1000,2,FALSE)

In one worksheet, this works perfectly. In another seemingly similar
worksheet, this same function doesn't work at all. After entering the
formula, as shown, the cell shows the formula as if I had entered it
as text.

Any suggestions?

thanks
 
J

Jim Thomlinson

Go to Edit -> Format Cell -> Number and switch from Text to General. Now go
to the cell and double click to get inot edit mode. Hit enter to exit edit
mode and you should be good to go...
 
J

Jim Thomlinson

Go to Edit -> Format Cell -> Number and switch from Text to General. Now go
to the cell and double click to get inot edit mode. Hit enter to exit edit
mode and you should be good to go...
 
N

Niek Otten

This cell was formatted as text before you entered the formula. Just formatting afterwards doesn't help.

Format as general AND re-enter the formula (F2, ENTER)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


| Hello,
| I am working on a sheet which sets up contact info based on a list,
| such as:
|
| Name.................
| Address...........
| City, State............
| Phone...............
|
| The "Name" cell is a drop down list, tied to data on another sheet.
| The other contact cells are activated using a VLOOKUP function. I use
| the following code in the "Address" box
|
| =VLOOKUP(C12,vendors!A1:L1000,2,FALSE)
|
| In one worksheet, this works perfectly. In another seemingly similar
| worksheet, this same function doesn't work at all. After entering the
| formula, as shown, the cell shows the formula as if I had entered it
| as text.
|
| Any suggestions?
|
| thanks
 
A

Andrew

This cell was formatted as text before you entered the formula. Just formatting afterwards doesn't help.

Format as general AND re-enter the formula (F2, ENTER)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


| Hello,
| I am working on a sheet which sets up contact info based on a list,
| such as:
|
| Name.................
| Address...........
| City, State............
| Phone...............
|
| The "Name" cell is a drop down list, tied to data on another sheet.
| The other contact cells are activated using a VLOOKUP function. I use
| the following code in the "Address" box
|
| =VLOOKUP(C12,vendors!A1:L1000,2,FALSE)
|
| In one worksheet, this works perfectly. In another seemingly similar
| worksheet, this same function doesn't work at all. After entering the
| formula, as shown, the cell shows the formula as if I had entered it
| as text.
|
| Any suggestions?
|
| thanks

Thanks everyone. I appreciate the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top