I need to be able to check whether a cell contains a formula or not.
Does anyone know of a function which can perform this check?
Strangely none of the information functions seem to show that (as far
as I can recall, anyway). However it's easy enough to build your own.
Copy this into a standard module:
Function DoesCellHaveFormula(rng As Range) As Boolean
If rng.HasFormula Then
DoesCellHaveFormula = True
End If
End Function
Then you can just use it as you would any other worksheet function,
like so:
=DoesCellHaveFormula(C4)