Clean data with AI formulas
An import left you with amounts like "1 200,00 zł", names typed in every casing and no margin column yet. A formula fixes all three: it runs on every row, gives the same result every time and never spends credits. AI helps only with writing the formula, if you want it to.
What you need: a table with a few rows of messy data and edit access to it. Drafting a formula with AI needs AI to be on for your organization and counts against its AI budget; writing the formula yourself is always free.
Step 1: Open the formula creator
Right-click a cell of the column you want to fill and choose Create formula…. With several cells selected, use Formula from selection…; in the cell bar above the grid, the fx sign opens the same creator.
Step 2: Describe the change
Type what you want under Ask AI for a formula and click Generate:
Strip currency symbols and spaces from Amount and turn it into a number.The draft lands in Formula, built on your real column names, for example num(row['Amount']). It is checked before you see it, so it always runs. You can also write or change it yourself: click a column under Columns to insert row['…'], or a function under Functions.
Step 3: Check the preview
Preview shows the result for real rows ("5 of 24 rows") before anything is written. "Some rows fail. Check the formula" points at rows where it breaks; wrap messy values in num(...) and guard empty ones with coalesce(...).
Step 4: Choose where the result goes
- Under Fill column, pick the column to fill, or Create new column…: give it a name, for example
Margin, and choose Number or Text. - Under Apply to, choose Whole column (the formula becomes the column's rule and runs for new rows too) or Selected cells (the results are written into those cells once).
- Click Apply to column or Apply to 3 cells.
Cells locked as ground truth and cells that are still processing are skipped and keep their values.
Step 5: Quick formulas in the cell bar
For simple math you do not need the creator. Select a cell of the column, type = and the expression in the cell bar, and press Enter:
=row['Revenue'] - row['Cost']A formula typed here applies to the whole column. The functions cover math, text, dates and logic: num, sum, avg, round, concat, replace, title, days_between, coalesce, A if condition else B and more (see Formulas and totals).
Step 6: Totals and quick sums
- Select a few cells: the status bar under the grid shows their Count, Sum, Avg, Min and Max.
- Click a cell of the Totals row under a column and pick Sum, Average, Min, Max, Count numbers or Count filled, or type your own, for example
=sum(col('Amount')).
Rules of the road
A formula never calls the AI and never spends credits. File and sub-sheet columns cannot be used in formulas, and a cell locked as ground truth is never overwritten.
Where to go next
- Formulas and totals: every function, formula rows and the Totals row.
- Columns and AI: when a column should be filled by AI instead.
- Publish a live dashboard: chart the cleaned numbers.