How do I convert text to numeric format?


Posted by April on June 22, 2001 12:59 PM

How can I convert text to numeric format so can do analysis? All I can find is information on how to convert numbers to text, not vice versa. Help!

Posted by Barrie Davidson on June 22, 2001 1:21 PM

Assuming your text information is in cell A1:
=VALUE(A1)

Barrie



Posted by Joe Was on June 22, 2001 1:59 PM

Text to Value, Value to Text VB code

This code may help you see how code works with the data. It can be run from a hot-key or a form button. This code puts a box on the screen with the answer, one box after another, first a value then as text.

Sub MyBox()
Set x = Worksheets("sheet1").Range("A1")
x.Value = 234567.8
x.NumberFormat = "$#,##_);($#,##0)"
MsgBox x.Value
MsgBox x.Text
End Sub