Formula Editor
The Formula Editor is the heart of Formula Foundry — a Monaco-based code editor tuned for spreadsheet formulas. It runs inside the Google Sheets add-on and the Excel add-in, and opens over whichever cell you’re working on.
What’s in the editor
The Editor window has four main areas:
- Tab bar at the top — one tab per formula you’re working on, each bound to a spreadsheet cell.
- Monaco editor in the middle — where you write the formula.
- Side rail on the right — quick access to AI Assistant, Custom Variables, and Snippets panels.
- Bottom toolbar — insert into cell, undo/redo, find, format, translator toggle, and editor options.
Tabs
Each tab holds one formula in flight. Tabs remember the cell they came from, their AI chat history, and the last formula text.
Right-click or use the tab menu to:
- Rename the tab — handy when juggling several formulas.
- Duplicate — clone the current tab to experiment without losing the original.
- Close, Close others, Close to the left, Close to the right.
The number of tabs you can have open at once depends on your plan’s maxOpenTabs quota. The Free plan gives you 1 editor tab; paid plans lift the cap to unlimited.
Writing formulas
Syntax highlighting
Functions, operators, cell references, strings, and numbers are each color-coded through a Formula Foundry-branded Monaco theme. The theme swaps with your light/dark preference automatically.
Auto-complete
Monaco’s completion widget suggests function names as you type; accept with Tab or Enter. Type @@ to trigger completion for your custom variables in the current spreadsheet.
Live error checking
The parser runs on every keystroke. Anything it can’t parse is underlined; hover for a human-readable message.
Live preview
Below the editor, the Insert Formula Bar shows the formula exactly as it will be written into the cell after variable substitution and locale translation — so what you see is what the spreadsheet gets.
Keyboard shortcuts
The editor uses Monaco’s standard shortcuts.
| Action | Shortcut |
|---|---|
| Undo | Ctrl + Z |
| Redo | Ctrl + Y |
| Find | ⌘ / Ctrl + F |
| Format formula | ⇧ + ⌥ + F (Shift+Alt+F) |
The AI prompt box has its own keys: Enter to send, Shift + Enter for a newline, Escape to abort a streaming response.
Editor options
The toolbar opens a small preferences popover where you can toggle:
- Font size — stepper from small to large.
- Line numbers — on/off.
- Minimap — the overview strip on the right of Monaco.
- Show whitespace — render dots for spaces and arrows for tabs.
Your choices are remembered per device.
Formula translator
Each editor tab has a dialect — Google Sheets or Microsoft Excel — set with the dropdown in the editor toolbar. A tab in your spreadsheet’s own dialect is inserted exactly as you wrote it (variables are still substituted and your locale’s separators still apply). A tab in the other dialect is translated on the fly: the preview bar and Insert always produce a formula your spreadsheet can run.
- In Google Sheets, an Excel-dialect tab lets you keep writing the Excel syntax you know. Names Sheets lacks are remapped (e.g.
VALUETOTEXT→TO_TEXT), patterns likeIF(ISERROR(…))becomeIFERROR(…), Excel-only operators such as@and--are cleaned up, and implicit array math is wrapped inARRAYFORMULA(). - In Excel, a Google Sheets-dialect tab works the same way in reverse — handy for formulas copied from Sheets or from tutorials written for it. Sheets-only names are remapped (e.g.
POW→POWER,REGEXMATCH→REGEXTEST),ARRAYFORMULA(…)wrappers are dropped because Excel handles arrays natively, and arguments are reshaped where the two functions disagree (SPLIT→TEXTSPLIT,JOIN→TEXTJOIN,COUNTUNIQUE→COUNTA(UNIQUE(…))).
Functions both platforms share (VAR, STDEV.S, CONCATENATE, TEXTJOIN, …) pass through exactly as written. Your editor text is never changed by switching the dialect — the dropdown only declares which language you’re writing in. The ? button next to it lists everything the translator handles on your platform.
Why is a function underlined in amber?
Amber marks a portability problem rather than a mistake: the formula is fine, but something in it won’t survive the trip to the other dialect. Hover the underline to see which.
- The other platform has no such function. In an Excel-dialect tab,
=WEBSERVICE(A1)is underlined because it translates unchanged and would come back as#NAME?once it lands in your sheet. Roughly fifty functions exist only in Google Sheets (QUERY,IMPORTRANGE,GOOGLEFINANCE,REGEXEXTRACT, …) and about as many only in Excel (AGGREGATE,WEBSERVICE, theCUBE…family, …). - You used a function from the other dialect. Paste
=TO_TEXT(A1)into an Excel-dialect tab and you’ll read “TO_TEXT is a Google Sheets function — Excel has no equivalent.” It’s a real function, just not here.
Red underlines still mean a genuine error: a misspelled name like SUMM(, an unbalanced bracket, or an undefined @@variable.
How do I rewrite my formula in my spreadsheet’s syntax?
Click To Sheets (in Google Sheets) or To Excel (in Excel) next to the dialect dropdown — the button appears while the tab is in the other dialect. It converts the formula in place, switches the tab’s dialect to match your spreadsheet, and shows an Undo toast that restores both the text and the dialect.
- If the formula has a syntax error, nothing is changed — fix the error and try again.
- Anything with no equivalent on your platform is carried over untouched, and the confirmation names it, so you know exactly what still needs rewriting by hand.
- Comments (
// …) are removed by conversion.
Migrating a whole workbook rather than one formula? The Migration Assistant scans every sheet and fixes the leftovers in bulk.
Inserting into the spreadsheet
Click Insert in the bottom bar to write the current formula into the cell the tab is bound to. Formula Foundry substitutes your variables, applies the locale, and writes the result through the host adapter — same write path the spreadsheet would use for a formula typed directly.