Formula to convert text to numbers / Vlookup help

futbol1097

New Member
Joined
Dec 14, 2005
Messages
32
I have a two worksheets "Results" and "Data". I have a Vlookup formula in "Results" that looks up an address (101, 4331, 207, etc.) in column A of "Data", and then returns what is in column B. Pretty simple.

The problem is that the addresses in "Results" are numbers, but the addresses in Data are text (because they are being filtered in through a SQL database that spits them out as text), so the Vlookup wont work. I need a formula that will convert the column A addresses in "Data" into numbers. Any ideas? The addresses will either be 4 or 5 digits long.
I can't just do Copy-Paste Special since I am dealing with a Sql database, and I have to be able to update this ssht all the time.

Or, I need to write a Vlookup formula that accounts for the fact that the lookup is a number but the table data is text.

Thanks,
R
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Datsmart

Well-known Member
Joined
Jun 19, 2003
Messages
7,985
Suggestion 1. (convert by Text to Columns)
Select the range of text numbers,
Click Data | Text to Columns...
Then Click "Finish".

Suggestion 2. (convert by addition)
Select a blank cell
Hit Ctrl-C to copy
Select your number range
Right Click and choose Paste Special
Click Add, then OK.

Suggestion 3. (If you have Excel 2003)
Select the cells affected and right click on the yellow "!" that shows up next to the cells and choose convert to number.
(Must have "Number stored as Text" checked in Tools|Options|Error Checking)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,717
Messages
5,597,729
Members
414,169
Latest member
Preston_Cleric

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
Top