apply the formula sign

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!!
 
G

Gord Dibben

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
 
J

Joe User

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 -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top