Formula Formatter for Excel

Format or flatten Excel formulas from the ribbon or with a keyboard shortcut. Free and open source (MIT).

Formula Formatter ribbon tab, and a formula before and after formatting

Just need to format one formula?

Use Formula Formatter Online: paste a formula, get it back formatted or flattened. Nothing to install, and it runs entirely in your browser.

Install

This add-in is not in Microsoft's add-in store. You install it yourself ("sideloading"), which takes about a minute. Pick your platform. Each option shows exactly what it changes on your computer.

Windows (Excel for Microsoft 365)

Option A: download and double-click.

  1. Download install.cmd. If your browser asks, choose Keep.
  2. Double-click it. If Windows shows "Windows protected your PC", click More info > Run anyway. That warning appears for any downloaded file that isn't signed by a paid certificate.
  3. Close all Excel windows and start Excel again.
  4. Go to Home > Add-ins and choose Formula Formatter for Excel under Developer Add-ins. The Formula Formatter tab then appears on the ribbon.

Want to see what it does first? Right-click the file > Edit (or open it in Notepad). It is a short, readable script, not a program.

Option B: one line in PowerShell. Open PowerShell (Start menu, type "PowerShell"), paste this and press Enter:

irm https://kmailmom.github.io/excel-formula-formatter/install.ps1 | iex

Then restart Excel and add it from Home > Add-ins > Developer Add-ins, as in step 4 above.

What the script changes: it saves manifest.xml to %LOCALAPPDATA%\ExcelFormulaFormatter\ and adds one value under HKCU\Software\Microsoft\Office\16.0\Wef\Developer pointing to that file. That's all. It does not install programs, does not need admin rights and does not touch other settings.

Uninstall: download and double-click uninstall.cmd, or run irm https://kmailmom.github.io/excel-formula-formatter/uninstall.ps1 | iex. It removes exactly those two things.

Mac (Excel for Microsoft 365)

Option A: one line. Open Terminal, paste this and press Enter:

curl -fsSL https://kmailmom.github.io/excel-formula-formatter/install-mac.sh | sh

Option B: by hand. Download the manifest and copy it into ~/Library/Containers/com.microsoft.Excel/Data/Documents/wef/ (create the wef folder if it doesn't exist).

Quit Excel (Cmd+Q) and start it again. Then go to Home > Add-ins and choose the add-in under Developer Add-ins.

Uninstall: delete excel-formula-formatter.xml from that wef folder.

Excel on the web

  1. Download the manifest file.
  2. In Excel on the web: Home > Add-ins > More Add-ins > My Add-ins > Upload My Add-in, and pick the file.

Menu names differ slightly between Excel versions.

Organisations (Microsoft 365 admins)

Deploy to users or groups from the Microsoft 365 admin center: Settings > Integrated apps > Upload custom apps, using this manifest URL:

https://kmailmom.github.io/excel-formula-formatter/manifest.xml

Layout density

Choose how compact the formatted formula is, from Expanded to Dense, under Options.

The same formula at three layout densities

Is this safe?

You should ask that about anything you install. You don't have to take our word for it; here's what you can check.

Details: SECURITY.md · privacy policy.

Updates

Excel loads the add-in from this site, so updates arrive automatically. Re-run the installer only when the release notes say so (for example when ribbon buttons change).