Hello,
I recently responded to an old 2002 post regarding creating an isFormula function for Excel 2007.
How to test if a specified cell contains a formula? (see Response #33).
The function (which works great) is:
My question : Is there a way to include this function in a VBA IF statement? Something like
Thanks,
Steve K.
I recently responded to an old 2002 post regarding creating an isFormula function for Excel 2007.
How to test if a specified cell contains a formula? (see Response #33).
The function (which works great) is:
VBA Code:
Function IsFormula(cell_ref As Range)
Application.Volatile
IsFormula = cell_ref.HasFormula
End Function
My question : Is there a way to include this function in a VBA IF statement? Something like
Code:
If IsFormula(B33) = True Then
code to do THIS
Else
code to do THAT
End If
Thanks,
Steve K.