Formula Syntax
EngCanvas formulas combine variables, units, cell references, operators, and functions into expressions that are evaluated with full dimensional analysis.
Variables
Assign a variable with =:
L = 20 ft
w = 1.5 kip/ft
Fy = 50 ksi
Variable names can include letters, digits, underscores, and apostrophes:
f'c = 4 ksi // concrete compressive strength
A_g = 144 in^2 // gross area
E_s = 29000 ksi // steel modulus
Variables are case-sensitive: L and l are different variables.
A bare identifier like A1 is treated as a variable name, not a cell reference. To reference cell A1, use $A1 or $A$1. This allows natural engineering variable names like L, M, b, d, N.
Numbers with units
Attach a unit directly after the number:
10 ft
1.5 kip/ft
4000 psi
30 deg
Numbers without units are dimensionless:
ratio = 0.85
n = 10
See Working with Units for the full unit reference.
Operators
Standard arithmetic and comparison operators, listed by precedence (lowest to highest):
| Precedence | Operators | Description |
|---|---|---|
| 1 (lowest) | +, - | Addition, subtraction |
| 2 | *, / | Multiplication, division |
| 3 | ^ | Exponentiation (right-associative) |
| 4 | : | Range operator |
| 5 | ! | Sheet reference |
| 6 (highest) | [i,j] | Index access |
Comparison operators: =, ==, <, >, <=, >=, <> (not equal).
See Operators for detailed behavior with units.
Cell references
Use $ to mark cell references:
$A1 // absolute column, relative row
A$1 // relative column, absolute row
$A$1 // fully absolute
$A1:$B10 // range
See Cell References for the complete guide.
Cross-sheet references
Reference cells on other sheets using the ! operator:
'Sheet 2'!$A1
The sheet name is quoted when it contains spaces. For single-word sheet names:
Sheet2!$A1
Functions
Call functions with parentheses:
M = SQRT(L^2 + d^2)
total = SUM($A1:$A10)
stress = IF(ratio > 1, "FAIL", "OK")
Functions are case-insensitive: SUM, Sum, and sum all work.
Aggregate functions
Aggregate functions accept ranges and multiple arguments:
SUM($A1:$A10)
AVERAGE($B1:$B20)
MAX(10 ft, 12 ft, 8 ft)
MIN($A1:$A5, $B1:$B5)
COUNT($A1:$A100)
Conditional functions
Apply criteria to filter values:
SUMIF($A1:$A10, ">5")
COUNTIF($B1:$B20, "<>0")
AVERAGEIF($A1:$A10, ">=10 ksi")
SUMIFS($C1:$C10, $A1:$A10, ">0", $B1:$B10, "<100 ft")
Criteria support: >, <, >=, <=, <>, =, and wildcards.
Logical functions
IF(fb < Fb, "OK", "NG")
AND(x > 0, x < 100 ft)
OR(type = 1, type = 2)
NOT(failed)
IFS(ratio < 0.5, "Light", ratio < 1.0, "OK", ratio >= 1.0, "Over")
SWITCH(grade, 50, "A992", 36, "A36", "Unknown")
Lookup functions
VLOOKUP(W14x22, $A1:$D50, 3, 0)
HLOOKUP(key, $A1:$Z3, 2, 0)
INDEX($A1:$C10, 3, 2)
MATCH(50 ksi, $A1:$A20, 0)
XLOOKUP(target, $A1:$A10, $B1:$B10, "Not found")
Matrices
Define matrices with brackets and semicolons:
M = [1, 2; 3, 4] // 2×2 matrix
v = [10 kip; 20 kip; 30 kip] // column vector with units
Access elements with index notation:
M[1, 2] // row 1, column 2 → 2
Table references
Reference cells in embedded tables:
TableName[A1] // single cell
TableName[A1:C10] // range
Box references (Report Canvas)
Reference calculation boxes on the report canvas:
Box7 // value from Box 7
Strings
Use single or double quotes:
'Hello World'
"Steel Grade A992"
Comments
Text after // is treated as a comment and ignored by the parser:
L = 20 ft // span length
w = 1.5 kip/ft // distributed load
Mixed fractions
EngCanvas supports mixed fraction notation:
38 3/8 in // equivalent to 38.375 in
This is parsed as 38 + (3/8).
Next steps
- Operators — detailed operator behavior
- Cell References — absolute vs. relative references
- Unit System — dimensional analysis deep dive