Test if cell contains a formula
=ISFORMULA(reference)
| Parameter | Description |
|---|---|
reference |
Reference to cell or cell range. |
If cell A1 contains the formula =2+2, the ISFORMULA function returns TRUE:
=ISFORMULA(A1) // returns TRUE
If cell A1 contains the text "apple", the ISFORMULA function returns FALSE:
=ISFORMULA(A1) // returns FALSE
To count cells in a range that contain formulas, you can use the SUMPRODUCT function like this:
=SUMPRODUCT(--ISFORMULA(range))