how to convert text to value

S

Sally

I have 40 thousands database of excel spreadsheet to convert from text eg.
12+3 to value. I tried many ways in doing but not success. Please help. thanks
 
B

Bernie Deitrick

Sally,

Select all the cells that you need to convert, and run this macro:

Sub TryNow()
Dim mycell As Range
For Each mycell In Selection
mycell.Value = Evaluate(mycell.Text)
Next mycell
End Sub

HTH,
Bernie
MS Excel MVP
 
Top