Text column to number column

goblin

Active Member
Joined
Apr 16, 2003
Messages
469
Can anyone tell me what exactly Excel uses to distinguish a normal cell from a cell storing text. Property name, flag name, anything. I just need to know how Excel knows!!! :D

I have a workbook exported from a database and some of the columns have numberical values stored as text. I'm trying to compare against one of those columns using the worksheet function MATCH, and it refuses to match the 'numbers stored as text' column to anything entered as numbers. And I have no idea how to enter numbers as text (formatting them as text does not seem to do the trick :) )

The only way I've found to get everything to work is to do a 'Text to columns' on the columns that are stored as text. Is there a simpler way?

Goblin
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
try using match with a value(cell_ref) or your text to column data.

eg match(value(a1),Sheet1!A:A,0)

this will convert the text '1 to a value of 1.
 
Upvote 0
If the "numbers" in your list (A1:A6) are text entries and your lookup cell (B1) contains a number, you can use:

=MATCH(TEXT(B1,"0"),A1:A6,0)
 
Upvote 0
Works like a charm! :D Never knew there was a worksheet function like that!

Thanks,
Goblin
 
Upvote 0

Forum statistics

Threads
1,221,695
Messages
6,161,361
Members
451,699
Latest member
sfairbro

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