> For the complete documentation index, see [llms.txt](https://help.modelreef.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.modelreef.io/syntax/formula-syntax/formula-validation-errors.md).

# Formula Validation Errors

{% stepper %}
{% step %}

### Types of validation checks

The Formula editor validates:

* **Syntax**
  * Only supported operators are used.
  * Parentheses are balanced.
* **References**
  * All referenced variables and drivers exist.
  * There are no unknown names.
* **Structural issues**
  * The formula does not contain unsupported constructs such as IF statements or cell references.

If any check fails, the formula is marked invalid.
{% endstep %}

{% step %}

### How errors are displayed

When there is a problem, the editor may:

* Highlight the problem area in the expression.
* Show an error message in the diagnostics or preview section.
* Disable the Save button until the error is resolved.

The error message will usually indicate the general cause, such as "Unknown reference" or "Unsupported operator".
{% endstep %}

{% step %}

### Common error causes

Common causes include:

* Typing an unsupported function such as `IF`, `SUM` or `MAX`.
* Misspelling a variable or driver name instead of selecting it from the sidebar or autocomplete.
* Leaving parentheses unmatched.
* Using a character that is not allowed in expressions.

Checking the message and reviewing the expression usually reveals the issue quickly.
{% endstep %}

{% step %}

### Fixing invalid formulas

To fix an invalid formula:

* Read the error message to understand the type of issue.
* Correct the expression, for example by selecting the correct reference from the sidebar.
* Confirm that the error message disappears and the preview updates.
* Save once the formula is valid.

You cannot save an invalid formula, so no broken formulas are stored in the model.
{% endstep %}

{% step %}

### Safe editing practices

To reduce formula errors:

* Prefer clicking variables and drivers from the sidebar instead of typing full names.
* Keep formulas relatively short and use drivers or intermediate variables for complex logic.
* Test changes incrementally, watching the preview as you go.

This keeps your formula layer maintainable and easier to review.
{% endstep %}
{% endstepper %}

## Related articles

* [Scenario Toggle Rules](/syntax/chart-and-table-syntax/scenario-toggle-rules.md)
* [Start & End Dates](/syntax/timing-syntax/start-and-end-dates.md)
* [COA Import](/help/xero-integration/coa-import.md)
* [Build an Acquisition Case vs Base Case](/how-tos/investment-and-transactions/build-an-acquisition-case-vs-base-case.md)
