ID EN
#Information

ISFORMULA

Excel Functions

Test if cell contains a formula

Syntax

EXCEL
=ISFORMULA(reference)

Arguments

Parameter Description
reference Reference to cell or cell range.

Return Value

TRUE or FALSE

Details

The ISFORMULA function returns TRUE if a cell contains a formula, and FALSE if not. When a cell contains a formula ISFORMULA will return TRUE regardless of the formula's output or error conditions. The ISFORMULA takes one argument, reference, which must be a cell reference. If cell A1 contains the formula =2+2, the ISFORMULA function returns TRUE: If cell A1 contains the text "apple", the ISFORMULA function returns FALSE: To count cells in a range that contain formulas, you can use the SUMPRODUCT function like this: The double negative coerces the TRUE and FALSE results from ISFORMULA into 1s and 0s and SUMPRODUCT returns the sum.

Examples

Examples

If cell A1 contains the formula =2+2, the ISFORMULA function returns TRUE:

EXCEL
=ISFORMULA(A1) // returns TRUE
Examples

If cell A1 contains the text "apple", the ISFORMULA function returns FALSE:

EXCEL
=ISFORMULA(A1) // returns FALSE
Count formulas

To count cells in a range that contain formulas, you can use the SUMPRODUCT function like this:

EXCEL
=SUMPRODUCT(--ISFORMULA(range))

See Also

FORMULATEXT ISBLANK ISERR ISERROR ISEVEN ISLOGICAL ISNA ISNONTEXT