Arithmetic#
Arithmetic expressions are intentionally basic. They are intended for simple documentation calculations, not full spreadsheet-style formulas.
Supported Operations#
+Addition-Subtraction*Multiplication/Division
Arithmetic expressions can use:#
Literal numbers
Cell references
Numeric results from formulas such as
SUM(),AVG(),MIN(),MAX(), andCOUNT()Parentheses for grouping
Examples#
=A2 + B2adds the values fromA2andB2.=A2 - B2subtractsB2fromA2.=A2 * B2multipliesA2andB2.=A2 / B2dividesA2byB2.=(A2 + B2) / 2averages two cells.=SUM(B2:B4) / COUNT(B2:B4)computes an average using aggregate formulas.=IF((A2 + B2) >= 10; STATUS(Passing; green); STATUS(Failing; red))uses arithmetic inside a conditional formula.
Division by zero#
Returns #VALUE! and produces a warning.
Example - Arithmetic Table#
Row |
Name |
C |
D |
Formula |
Rendered |
|---|---|---|---|---|---|
2 |
Add |
2 |
3 |
|
5 |
3 |
Subtract |
10 |
20 |
|
-10 |
4 |
Multiply |
4 |
5 |
|
20 |
5 |
Multiply |
4.5 |
5.5 |
|
24.75 |
6 |
Divide |
10 |
2 |
|
5 |
7 |
Divide |
10.5 |
-3.4 |
|
-3.09 |
.. rcsv-table::
:header-rows: 1
Row,Name,C,D,Formula,Rendered
2,Add,2,3,``=C2 + D2``,=C2 + D2
=A2+1,Subtract,10,20,``=C3 - D3``,=C3 - D3
=A3+1,Multiply,4,5,``=C4 * D4``,=C4 * D4
=A4+1,Multiply,4.5,5.5,``=C5 * D5``,=C5 * D5
=A5+1,Divide,10,2,``=C6 / D6``,=C6 / D6
=A6+1,Divide,10.5,-3.4,``=C7 / D7``,=C7 / D7 | ROUND(2)