apply the formula sign

  • Thread starter Thread starter canvas
  • Start date Start date
C

canvas

Hi,

I´ve imported data from other application and some cells have some
formulas like 10*12 but without the = sign. How can I apply the = sign
to all the cells quickly without going one by one so that it
calculates the formula. Example, =10*12, should be 120.

Thanks!!
 
Copy this UDF to a general module in your workbook.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function

In an adjacent cell enter =EvalCell(cellref)


Gord Dibben MS Excel MVP
 
Gord Dibben said:
Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function

Is there any reason to make the function Volatile if you pass RefCell and
use it in the function?

Volatile is evil: the referencing cell gets recalculated and the function
gets called every time any cell in the workbook is edited or filled in.

Why not rely on normal recalculation protocol to determine when to
recalculate the referencing cell?


----- original message -----
 
Back
Top