ISFORMULA Function Examples – Excel & Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on November 6, 2023
Download Example Workbook

Download the example workbook

This tutorial demonstrates how to use the ISFORMULA Function in Excel to test if a cell contains a formula.

ISFORMULA main

How to use the ISFORMULA Function

The ISFORMULA Function tests if a cell contains a formula. If the cell contains a formula it returns TRUE, otherwise it returns FALSE.

=ISFORMULA(A2)

ISFORMULA

If Is Formula

Usually, after performing a logical test, you will want to do something based on the result of that test. The IF Function can be used to perform different actions if a statement is evaluated as TRUE or FALSE. Let’s use it with the ISFORMULA Function.

=IF(ISFORMULA(A2),"formula", "not formula")

IF ISFORMULA

FORMULATEXT Function

The FORMULATEXT Function converts a cell formula to text. However, if the cell does not contain a formula, FORMULATEXT will throw an error. This is a great opportunity to use the ISFORMULA Function.

=IF(ISFORMULA(A2),"formula", "not formula")

FORMULATEXT

In this example, we use the ISFORMULA Function to test if a cell contains a formula. If so, it will output the formula as text with the FORMULATEXT Function. If not, it will output the cell value.

If Is Not Formula

The NOT Function inverts logical results. It changes TRUE to FALSE and FALSE to TRUE. Here we can use NOT, alongside the ISFORMULA and IF Functions.

=IF(NOT(ISFORMULA(A2)),"not formula", "formula")

IF NOT ISFORMULA

Other Logical Functions

Excel / Google Sheets contain many other logical functions to perform other logical tests. Here is a list:

IF / IS Functions
iferror
iserror
isna
iserr
isblank
isnumber
istext
isnontext
isformula
islogical
isref
iseven
isodd

ISFORMULA in Google Sheets

The ISFORMULA Function works exactly the same in Google Sheets as in Excel:

ISFORMULA Google

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to List of Excel Functions