Inconsistent behavior using VLOOKUP

  • Thread starter Thread starter Andrew
  • Start date Start date
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
 
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...
 
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...
 
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
 
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.
 
Back
Top