Formulas in excels


Posted by sam on January 29, 2002 8:22 AM

I have a column of cells that contain different numbers seperted by a "+" for example
1.00+2.00+3.00
2.00+9.23+4.00

I am trying to get these cells to calculate the value of the cell instead of showing the numbers. The cells are not formulas since there is no = sign infront of the numbers. And since I am importing these cells from another application I cant enter an = sign on them. The only way I can find to calculate the cell is to click on the equals sign in the formula bar and then click OK. Is there a way to do this operation on the entire column, I have over 2000 rows to do this to daily, and selecting each individual cell and then converting it to a formula is time consuming. I have tried highlighting the column and performing the above operation but it justs changes the first cell. Any help would be greatly appreciated.

Posted by Mark W. on January 29, 2002 8:29 AM

Assuming that A1 contains "1.00+2.00+3.00"...
enter the formula "="&A1 into B1 and Copy down
as far as needed. Select column B and perform
a Copy/Paste Special Values. Finally, with
press Control+H and replace occurances of = with
=.



Posted by JohnG on January 29, 2002 8:38 AM

Highlight area to be converted then run the following

Sub TextToFormula()
Dim TCell
For Each TCell In Selection
TCell.Value = "=" & TCell.Value
Next
End Sub