Spreadsheet
Formulas
This group writes formulas into cells. It covers a single formula in one cell, array formulas over a range, ready-made helpers for the common function families (text, date, logical, lookup, statistical, financial, math), user-defined functions, formulas that reference another sheet or another workbook, copying a formula across a range (adjusting the references as it goes), converting a reference inside a formula to absolute/relative form, and defining a workbook-wide named formula.
Prerequisite: before using any of these instructions, the workflow must already
have an XLSX spreadsheet created or opened (with Create spreadsheet). Every
instruction works on a sheet (tab) inside that spreadsheet, identified by name
(Sheet1 by default), which must already exist.
These concepts recur across several instructions in this group; they are explained here once.
- Document: indicates which document in the workflow the instruction applies to. If left empty, the current document is used.
- The sheet must already exist: the Sheet name field chooses which tab the
instruction works on, and defaults to
Sheet1. If no sheet with that name is found, the instruction does nothing and the workflow continues with the next instruction. - Cells are created automatically: the target cell (and its row) is created if it doesn’t exist yet. If a cell address is invalid, that instruction simply does nothing.
- Formulas are stored, not calculated here: the instruction writes the formula text into the cell and marks it for recalculation. The result appears when you open the file in a spreadsheet app, which does the actual math — the engine itself doesn’t evaluate formulas.
- The leading
=is optional: you can type a formula with or without the leading=(=SUM(B1:B10)orSUM(B1:B10)); both work. - Leaving the essential field empty does nothing: every instruction in this group
needs one piece of content — the Formula, the Function name, the Name of the
defined name, or the sheet/workbook being referenced. If that field is left empty,
the instruction does nothing instead of writing a broken formula such as
(B1)or'[]Sheet1'!$B$2into the cell. Optional pieces (the Arguments, for instance) may be empty —TODAY()takes none. - Dynamic values (
@name): every field in this group is a text field, so in any of them (sheet name, cell address, formula, function name, arguments, …) you can type@followed by the name of a value saved earlier in the workflow, and it will be replaced by that value.
- Copy Formula To Range .xlsx
- Define Named Formula .xlsx
- Set Absolute Reference .xlsx
- Write Array Formula .xlsx
- Write Cell Formula .xlsx
- Write Date Formula .xlsx
- Write Financial Formula .xlsx
- Write Formula With Sheet Reference .xlsx
- Write Formula With Workbook Reference .xlsx
- Write Logical Formula .xlsx
- Write Lookup Formula .xlsx
- Write Math Formula .xlsx
- Write Statistical Formula .xlsx
- Write Text Formula .xlsx
- Write UDF Formula .xlsx
Copy Formula To Range .xlsx
Copies the formula from one cell to every cell of a range, adjusting the relative references for each destination cell (just like dragging a formula down or across in a spreadsheet app).
When to use it: after writing a formula in the first row of a column (e.g.
=A2*B2), to fill the same calculation down a whole range without rewriting it.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Source cell address | Cell holding the formula to copy (A1). Supports @name |
A1 |
No |
| Target start cell | Top-left cell of the range to fill (A2). Supports @name |
A2 |
No |
| Target end cell | Bottom-right cell of the range to fill (A10). Supports @name |
A10 |
No |
Important behavior: relative references shift with each cell; references
fixed with $ (e.g. $B$1) stay put. If the source cell has no formula, or any
address is invalid, nothing happens.
Define Named Formula .xlsx
Creates a named formula at the workbook level — a name that stands for a formula or expression and can be reused in other formulas.
When to use it: to give a meaningful name to a calculation or a range
(e.g. TaxRate, TotalRevenue) and then write cleaner formulas that use the name.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Name | The name being defined (TotalRevenue). Supports @name |
TotalRevenue |
No |
| Formula | The formula/expression the name stands for. Supports @name |
=SUM(Sheet1!$B$2:$B$100) |
No |
| Comment | Optional note describing the name. Supports @name |
(empty) | No |
Important behavior: if a name with the same text already exists, it is
replaced. The leading = is removed automatically. The comment is only added
when it isn’t empty.
Set Absolute Reference .xlsx
Changes a cell reference inside an existing formula to absolute, mixed, or
relative form (adding or removing the $ signs).
When to use it: to lock (or unlock) a reference in a formula you already wrote —
for example turning A1 into $A$1 so it won’t shift when copied.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The reference to reformat (e.g. A1). Supports @name |
A1 |
No |
| Reference style | absolute ($A$1), col ($A1), row (A$1) or relative (A1). Supports @name |
absolute |
No |
| Target cell | The cell whose formula will be edited (B1). Supports @name |
B1 |
No |
Important behavior: it edits the formula that already lives in Target cell,
replacing every occurrence of the given reference with the chosen style. If the
target cell has no formula, nothing happens. An unknown style falls back to
absolute.
Write Array Formula .xlsx
Writes an array formula (also called a CSE formula) over a cell or a range — one formula that produces results across several cells at once.
When to use it: for calculations that work on whole ranges at a time, such as
=A1:A5*B1:B5 to multiply two columns element by element.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Start cell | Top-left cell of the array range (C1). Supports @name |
C1 |
No |
| End cell | Bottom-right cell of the array range (C5). Supports @name |
C5 |
No |
| Formula | The array formula (=A1:A5*B1:B5, with or without { }). Supports @name |
=A1:A5*B1:B5 |
No |
Important behavior: the formula is attached to the first cell of the range
and marked as spanning the whole range; the spreadsheet app fills in the other cells when it
recalculates. Any surrounding { } and leading = are removed automatically.
Write Cell Formula .xlsx
Writes a formula into a single cell. This is the general-purpose instruction — it accepts any formula, including cross-sheet, cross-workbook and user-defined function calls.
When to use it: whenever you need a plain formula in one cell and don’t need one of the specialized helpers below.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write the formula into (A1). Supports @name |
A1 |
No |
| Formula | The formula text (=SUM(B1:B10), = optional). Supports @name |
=SUM(B1:B10) |
No |
Important behavior: the leading = is optional. The cell and its row are
created if missing; an invalid cell address is a no-op.
Write Date Formula .xlsx
Helper that writes a date/time function into a cell (e.g. TODAY, NOW, YEAR,
MONTH, DAY, DATE).
When to use it: to insert a date calculation without typing the parentheses — you give the function name and its arguments separately.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Function name | The date function (TODAY, YEAR, …). Supports @name |
TODAY |
No |
| Arguments | What goes inside the parentheses (may be empty). Supports @name |
(empty) | No |
Important behavior: the final formula is built as FUNCTION(arguments); the
function name is written in upper case. Leave Arguments empty for functions that
take none (TODAY(), NOW()).
Write Financial Formula .xlsx
Helper that writes a financial function into a cell (e.g. PMT, NPV, IRR,
FV, PV).
When to use it: for loan, investment and cash-flow calculations, giving the function name and its arguments separately.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Function name | The financial function (PMT, NPV, …). Supports @name |
PMT |
No |
| Arguments | What goes inside the parentheses (B1/12, B2, B3). Supports @name |
B1/12, B2, B3 |
No |
Important behavior: the final formula is built as FUNCTION(arguments); the
function name is written in upper case.
Write Formula With Sheet Reference .xlsx
Writes a formula that references a cell or range in another sheet of the same
workbook (e.g. ='Sheet2'!$B$2).
When to use it: to pull a value or run a calculation on data that lives on a different tab.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab where the formula is written. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Referenced sheet | The other tab being referenced (Sheet2). Supports @name |
Sheet2 |
No |
| Referenced cell | The cell or range on that tab (B2, B2:B10). Supports @name |
B2 |
No |
| Formula prefix | Text placed before the reference (=, or =SUM(). Supports @name |
= |
No |
| Formula suffix | Text placed after the reference (e.g. )). Supports @name |
(empty) | No |
Important behavior: the referenced cell/range is turned into an absolute
reference ($B$2) and wrapped as 'Sheet'!$B$2, then combined with the prefix and
suffix. So prefix =SUM(, referenced cell B2:B10, suffix ) gives
=SUM('Sheet2'!$B$2:$B$10).
Write Formula With Workbook Reference .xlsx
Writes a formula that references a cell or range in another workbook (a separate
.xlsx file), using the spreadsheet external-link syntax (e.g. =[Budget.xlsx]Sheet1!$B$2).
When to use it: to link a value from a different spreadsheet file into this one.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab where the formula is written. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| External file path | Path of the other workbook. Only its file name is used. Supports @name |
C:\Data\Budget.xlsx |
No |
| External sheet name | The tab inside that workbook (Sheet1). Supports @name |
Sheet1 |
No |
| External cell address | The cell or range in that workbook (B2). Supports @name |
B2 |
No |
| Formula prefix | Text placed before the reference (=, or =SUM(). Supports @name |
= |
No |
| Formula suffix | Text placed after the reference (e.g. )). Supports @name |
(empty) | No |
Important behavior: only the file name of External file path is used in the
formula; the external reference is made absolute and written as
'[FileName.xlsx]Sheet'!$B$2. The result shows correct values in a spreadsheet app only when
that external file is reachable.
Write Logical Formula .xlsx
Helper that writes a logical function into a cell (e.g. IF, AND, OR, NOT,
IFERROR).
When to use it: for decisions and conditions, giving the function name and its arguments separately.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Function name | The logical function (IF, AND, …). Supports @name |
IF |
No |
| Arguments | What goes inside the parentheses. Supports @name |
B1>0, "Positive", "Zero or negative" |
No |
Important behavior: the final formula is built as FUNCTION(arguments); the
function name is written in upper case. Text values inside the arguments must keep
their own quotes.
Write Lookup Formula .xlsx
Helper that writes a lookup function into a cell (e.g. VLOOKUP, HLOOKUP,
XLOOKUP, INDEX, MATCH).
When to use it: to fetch a value from a table by matching a key, giving the function name and its arguments separately.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Function name | The lookup function (VLOOKUP, INDEX, …). Supports @name |
VLOOKUP |
No |
| Arguments | What goes inside the parentheses. Supports @name |
D1, A1:B100, 2, FALSE |
No |
Important behavior: the final formula is built as FUNCTION(arguments); the
function name is written in upper case.
Write Math Formula .xlsx
Helper that writes a math function into a cell (e.g. ROUND, INT, ABS,
POWER, SQRT, MOD).
When to use it: for arithmetic and rounding, giving the function name and its arguments separately.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Function name | The math function (ROUND, POWER, …). Supports @name |
ROUND |
No |
| Arguments | What goes inside the parentheses (B1, 2). Supports @name |
B1, 2 |
No |
Important behavior: the final formula is built as FUNCTION(arguments); the
function name is written in upper case.
Write Statistical Formula .xlsx
Helper that writes a statistical function into a cell (e.g. AVERAGE, COUNT,
MAX, MIN, SUM, MEDIAN).
When to use it: to summarize a column or range, giving the function name and its arguments separately.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Function name | The statistical function (AVERAGE, MAX, …). Supports @name |
AVERAGE |
No |
| Arguments | What goes inside the parentheses (B1:B100). Supports @name |
B1:B100 |
No |
Important behavior: the final formula is built as FUNCTION(arguments); the
function name is written in upper case.
Write Text Formula .xlsx
Helper that writes a text function into a cell (e.g. CONCAT, UPPER, LOWER,
TRIM, LEN, LEFT, RIGHT).
When to use it: to build or clean up text, giving the function name and its arguments separately.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| Function name | The text function (CONCAT, UPPER, …). Supports @name |
CONCAT |
No |
| Arguments | What goes inside the parentheses. Supports @name |
B1, " ", C1 |
No |
Important behavior: the final formula is built as FUNCTION(arguments); the
function name is written in upper case. Literal text inside the arguments must keep
its own quotes.
Write UDF Formula .xlsx
Writes a call to a user-defined function (UDF) — a custom function stored in the workbook or provided by an add-in.
When to use it: to call your own function by name (e.g. MyCustomFunction) the
same way you’d call a built-in one.
| Parameter | Meaning | Default | Required |
|---|---|---|---|
| Document | Document the instruction applies to | (current document) | No |
| Sheet name | Tab to work on. Supports @name |
Sheet1 |
No |
| Cell address | The cell to write into (A1). Supports @name |
A1 |
No |
| UDF name | The custom function’s name (case preserved). Supports @name |
MyCustomFunction |
No |
| Arguments | What goes inside the parentheses (B1, C1). Supports @name |
B1, C1 |
No |
Important behavior: unlike the other helpers, the UDF name keeps its exact case (it is not upper-cased). The function only returns a real value in a spreadsheet if that UDF actually exists in the workbook or a loaded add-in.
This documentation is the help of the application, and it comes underCreative Commons Attribution 4.0.