Information functions
ISFORMULA
Matches all 16 recorded answers
Recorded: 16 workbook cells. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | ISFORMULA |
| Bulgarian | ISFORMULA |
| Czech | ISFORMULA |
| Danish | ER.FORMEL |
| German | ISFORMULA |
| Greek | ISFORMULA |
| English (Australia) | ISFORMULA |
| English (United Kingdom) | ISFORMULA |
| English (United States) | ISFORMULA |
| Spanish | ESFORMULA |
| Estonian | ISFORMULA |
| Finnish | ONKAAVA |
| French | ESTFORMULE |
| Hebrew | ISFORMULA |
| Croatian | ISFORMULA |
| Hungarian | KÉPLET |
| Indonesian | ISFORMULA |
| Italian | ISFORMULA |
| Japanese | ISFORMULA |
| Korean | ISFORMULA |
| Lithuanian | ISFORMULA |
| Latvian | ISFORMULA |
| Norwegian | ISFORMULA |
| Dutch | ISFORMULE |
| Polish | CZY.FORMUŁA |
| Portuguese (Brazil) | ISFORMULA |
| Portuguese (Portugal) | É.FORMULA |
| Romanian | ISFORMULA |
| Russian | ЕФОРМУЛА |
| Slovak | ISFORMULA |
| Slovenian | ISFORMULA |
| Serbian (Latin) | ISFORMULA |
| Swedish | ÄRFORMEL |
| Thai | ISFORMULA |
| Turkish | EFORMÜLSE |
| Ukrainian | ISFORMULA |
| Vietnamese | ISFORMULA |
| Chinese (Simplified) | ISFORMULA |
| Chinese (Hong Kong) | ISFORMULA |
| Chinese (Traditional) | ISFORMULA |
Names from Microsoft's support site.
What it does
ISFORMULA(reference)
ISFORMULA(reference) returns TRUE if the referenced cell contains a formula, and FALSE if
it does not.
Microsoft's description, verbatim: "Checks whether there is a reference to a cell that contains a formula, and returns TRUE or FALSE."
The important word is contains. ISFORMULA asks about the cell's content — is there a
formula stored there — not about the cell's value. A cell holding =1+1 and a cell holding the
literal 2 display the same thing, produce the same value everywhere downstream, and are
distinguished by exactly one worksheet function: this one.
Microsoft's TYPE page states the complementary limitation from the other side: "You cannot use
TYPE to determine whether a cell contains a formula." ISFORMULA, added in Excel 2013, is the
function that filled that hole.
Arguments
reference — required, exactly one. The published signature is ISFORMULA(reference).
Microsoft's argument description, verbatim: "Reference is a reference to the cell you want to test. Reference can be a cell reference, a formula, or a name that refers to a cell."
Two things that sentence settles, and one it does not:
- A defined name is admissible provided it resolves to a reference. A name that refers to a constant or to a formula expression is not a reference and is an error — see "Errors".
- "A formula" in that list means an expression that produces a reference, such as
INDIRECT("A1")orOFFSET(A1,0,0).ISFORMULA(INDIRECT("A1"))asks whetherA1holds a formula, not whetherINDIRECT(...)is one. - What it does not settle is the multi-cell case.
ISFORMULA(A1:A10)is not addressed by the documentation, and whether it spills a column of booleans on a modern build or intersects to a single answer is not established here.
The argument is a reference position, not a value position. Handing ISFORMULA a computed
value is a failure, not a coercion, and that is exactly what the documented #VALUE! condition
covers.
Try it
Quirks
Result and edge cases
Returns a Logical.
- A cell containing a constant is
FALSE— including a constant that was typed as the result of a formula and then pasted as values, which is the workflow this function exists to audit. - An empty cell is
FALSE. It contains no formula. - A cell whose formula evaluates to an error is still
TRUE. The formula is there; its result is irrelevant. This is the property that makesISFORMULAuseful for auditing a broken sheet —ISERRORfinds the symptom,ISFORMULAfinds whether there is anything to fix. - A cell whose formula returns the empty string is
TRUE, whileISBLANKon it isFALSEand it looks empty. The three-way disagreement between what the eye sees, whatISBLANKsays and whatISFORMULAsays is the standard way to find=""helper columns. - A spilled cell. The anchor of a dynamic array holds the formula; the spilled-into cells do
not hold formulas of their own. What
ISFORMULAreports for a spilled-into cell is not established here, and it is the single most interesting open question about this function on a modern build. - Volatility. The function is declared
NonVolatile, unlikeCELLandINFO— editing a cell's content is a change Excel's dependency graph tracks, soISFORMULAdoes not need to recalculate on a timer the way a formatting query does.
Errors
#VALUE!— documented, verbatim: "If reference is not a valid data type, such as a defined name that is not a reference, ISFORMULA returns the #VALUE! error value." This covers a literal, a computed value, and a defined name that resolves to a constant or an expression.#NAME?would arise beforeISFORMULAruns, from an unresolvable name, in reference resolution (coercion and lifting).#REF!likewise, from a reference whose target has been deleted.- Arity — zero arguments or two. Expected to be refused at formula entry rather than evaluated (the call pipeline).
Note that ISFORMULA is one of the few IS-named functions with a documented error return.
The classifiers have none; ISFORMULA has one because its argument can genuinely be of the
wrong kind.
How to implement
Notes for implementers
ISFORMULAcannot be answered from values. It requires a workbook that stores cell content distinctly from cell value. An engine whose model is "cells hold values" cannot implement it, and should refuse rather than guess.- The reference must survive preparation unresolved. Dereferencing loses the subject entirely: the value at the cell says nothing about whether a formula produced it.
- The documented
#VALUE!is a real, reachable path, not a fallback. It fires for a defined name that is not a reference, which is a case an implementation must distinguish from an unresolvable name (#NAME?). - Decide the multi-cell and spill cases deliberately and record them as decisions awaiting evidence; the documentation covers neither.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
ISFORMULA · 1 lines · calc-func/src/catalogue/information.rs on GitHubunary(ISFORMULA, "ISFORMULA", REFERENCE, isformula)
isformula · 26 lines · calc-func/src/catalogue/information.rs on GitHub/// ISFORMULA: whether the reference's first cell holds a formula, as the host says; see the
/// module documentation. The call interface refuses any other argument at admission, as Excel refuses
/// such a formula at entry.
fn isformula(
arguments: &[CalcValue],
services: &mut EvalServices<'_>,
) -> Result<CalcValue, FunctionFault> {
let site = Site::new(ISFORMULA, services);
let cell = match arguments[0].core_ref() {
CoreRef::Reference(reference) => reference.areas()[0].first(),
_ => return Site::finish(Err(site.not_modelled(Some(0)))),
};
// dc-ylr: Excel gives ISFORMULA of a reference to a closed workbook #N/A.
if services
.host()
.is_some_and(|host| host.is_external_sheet(cell.sheet()))
{
return Site::finish(Ok(CalcValue::error(WorksheetErrorCode::NA)));
}
let known = services.host().and_then(|host| host.is_formula(cell));
Site::finish(
known
.map(CalcValue::logical)
.ok_or_else(|| site.not_modelled(Some(0))),
)
}
Kernels shared with other functions
readercatalogue/aggregateread_referencecatalogue/aggregateunarycatalogue/informationscalarcatalogue/informationknowncatalogue/informationeachcatalogue/informationncatalogue/informationn_ofcatalogue/informationreferencedcatalogue/information
Argument and result plumbing
operandcoerce
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Alternatives
Relationships
FORMULATEXT(reference)returns the formula's text whereISFORMULAreturns a boolean. They arrived together in Excel 2013 and are usually used together:IF(ISFORMULA(A1), FORMULATEXT(A1), A1)renders a sheet's formulas alongside its constants.FORMULATEXTreturns#N/AwhereISFORMULAreturnsFALSE, which is why the guard is worth writing.TYPEexplicitly cannot answer this question; Microsoft says so on its own page.CELL("contents", ref)returns the value, "not a formula" in Microsoft's own words — the same limitation stated a third time.ISREFtests whether an expression is a reference;ISFORMULAtests what is stored at one. Both are reference-aware and they are easy to confuse.ISBLANKis the companion in the=""diagnosis described above.SHEET,SHEETS,CELL,INFOare the other host-backed members of the Information category.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents