Vlookup inconsistencies and remedy

Tigerexcel

Active Member
Joined
Mar 6, 2020
Messages
493
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
A 2 part question. Everyone has had the issue of Vlookup returning an error when a field is formatted as text and it requires a number. I run into this issue but it doesn't always return an error, sometimes even on the same files it returns inconsistent results. I notice it particularly when I download an external file. What is the main factor in causing this error, is it that the lookup value is formatted as text, or is the table array the major issue? The lookup formula will work sometimes when one or the other is formatted as General or Number but not always.
Even when you have formatted both the lookup value and the corresponding entry in the table array, a re-set is sometimes required to return the correct value. I usually do this by re-typing some of the lookup formula and that does the trick. I'd like to combine all these steps into a one-step process which will probably a macro so that I speed up the processing, anyone have such a macro?
 
Thanks to Jason and Mark for resolution of this vexing issue. It does appear that it's not important whether the source files are formatted as text, it's the cell that has the formula that is the key and if it's formatted as text then it will lead to the situation mentioned.
Another interesting quirk is that if you use find and replace with an = sign in the formula then it returns a value/correct entry. If you use F2 and re-type = it doesn't work. With my example I left it as Text, the formula corrects itself with a replace even though it still reads as text format.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top