ISFORMULA Function
Tests a specified cell to see if it contains a formula (TRUE) or not (FALSE)
Tests a specified cell to see if it contains a formula (TRUE) or not (FALSE)
The ISFORMULA Function in Excel is an Information function. It will test a specified cell to see if it contains a formula and if it does contain a formula then it will return TRUE, else, it will return FALSE. The ISFORMULA function was introduced in MS Excel 2013. The purpose of the function is to show the formula, if any, contained in the cell.
=ISFORMULA(reference)
The ISFORMULA function uses the following argument:
It is a built-in function which can be used as a worksheet function in Excel. To understand the uses of this function, let’s consider a few examples:
Let’s say we are given the data below and we wish to find out if any formula was used (or not used) in the data.
The formula would be ISFORMULA “cellreference” as shown below:
The results would be:
So, the function gave us the cells that contained a formula.
Let’s see how this formula can be used with conditional formatting. If we are dealing with large amounts of data and we wish to highlight cells that contain a formula, we can do that using ISFORMULA along with conditional formatting.
Now we are given the quarterly rent paid and we’ve calculated monthly rent paid in the adjacent column by using the ISFORMULA function.
To apply conditional formatting that will highlight cells with formulas, we need to follow following steps:
=ISFORMULA(D2)
Let’s assume that in Example 1 you don’t wish to get TRUE or FALSE but require the formula to return ‘No formula used.’ This can be done by inserting the formula:
=IF(ISFORMULA(B2), FORMULATEXT(B2), “No formula used”)
The results would be:
Let’s now see how we can use FORMULATEXT, ISFORMULA and TEXTJOIN functions together. Suppose we are given the following data:
Where row 13 is the sum of all the rows above it.
Now, using the formula:
=TEXTJOIN(CHAR(10),TRUE,IF(ISFORMULA(fRange),ADDRESS(ROW(fRange),COLUMN(fRange))&”:”&FORMULATEXT(fRange),””))
We can find out which cells contain a formula. So, FORMULATEXT, ISFORMULA, and TEXTJOIN functions all were used simultaneously.
{#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;#N/A,#N/A;”$A$13:=SUM(A1:B12)”,”$B$13:=SUM(B1:B12)”}
When we applied the ISFORMULA to it the result was:
{FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;FALSE,FALSE;TRUE,TRUE}
Hence, the final array created by the IF function looks like this:
{“”,””;””,””;””,””;””,””;””,””;””,””;””,””;””,””;””,””;””,””;””,””;””,””;”$A$13:=SUM(A1:A12)”,”$B$13:=SUM(B1:B12)”}
When this array was processed by the TEXTJOIN function, it gave a string of formulas with their corresponding cell locations.
So, we got the result as:
Click here to download the sample Excel file
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional resources:
To master the art of Excel, check out CFI’s FREE Excel Crash Course, which teaches you how to become an Excel power user. Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.
Launch CFI’s Free Excel Course now to take your career to the next level and move up the ladder!