Is it a formula or input data?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a formula that distinguishes if a cell contains a number as a result
of a formula or data that has been directly input (i.e., formula
overwritten)?
 
A UDF would do that. Paste this in as a workbook module:-

Function isFormula(rng As Range) As Boolean
isFormula = 0
If rng.HasFormula = True Then
isFormula = 1
Else
End If
End Function

Call it with =isformula(a1)

Mike
 
This user defined function will return true or false.

Function IsFormula(cell)
IsFormula = cell.HasFormula
End Function

Usage is: =IsFormula(cellref)


Gord Dibben MS Excel MVP
 
Back
Top