Excel function

J

JRem

I want to check automatically if a cell contains a formula or a value.
Objective: execute a macro to replace the formula by its value or to put
back the formula in the cell
 
B

Bob Phillips

If Range("A1").HasFormula Then
'do something


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
M

Mike H

Hi.
Objective: execute a macro to replace the formula by its value or to put
back the formula in the cell

Which is it, replace the formula with it's value or put the formula back in
the cell. What is the criteria for doing each?

Mike
 
Top