Supported Formulas
Titan Engine compiles formulas into bytecode using a Pratt parser. The standard library is implemented entirely in Rust and operates directly on VM values for extreme speed.
Math & Logic
SUM(range1, [range2, ...])
Adds all numbers in a range of cells.
=SUM(A1:A10, C1)
AVERAGE(range)
Returns the average (arithmetic mean) of the arguments.
=AVERAGE(B2:B20)
IF(logical_test, value_if_true, value_if_false)
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE. Titan uses short-circuit compilation (`JumpIfFalse`) so the un-taken path is never executed.
=IF(A1>100, "Pass", "Fail")
Lookup & Arrays
Titan employs an $O(1)$ spatial hash cache internally during lookup batch processing. If you perform 5,000 `VLOOKUP`s against the same table, the table is cached into memory automatically on the first execution, making the remaining 4,999 lookups instantaneous.
VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify.
=VLOOKUP("Apple", A1:C100, 3, FALSE)
SUMIFS(sum_range, criteria_range1, criteria1, ...)
Adds the cells in a range that meet multiple criteria.
=SUMIFS(C1:C100, A1:A100, "North", B1:B100, ">50")
Full Function Reference
Titan currently supports 30+ native functions:
- SUM
- AVERAGE
- MIN
- MAX
- ROUND
- ROUNDUP
- ROUNDDOWN
- ABS
- MOD
- IF
- IFS
- IFERROR
- AND
- OR
- NOT
- TODAY
- NOW
- DATE
- EOMONTH
- DATEDIF
- CONCATENATE
- TEXTJOIN
- LEFT
- RIGHT
- MID
- LEN
- FIND
- SEARCH
- SUBSTITUTE
- REPLACE
- TRIM
- VLOOKUP
- HLOOKUP
- INDEX
- MATCH
- XLOOKUP
- SUMIF
- SUMIFS
- COUNT
- COUNTA
- COUNTBLANK
- COUNTIF
- COUNTIFS
- AVERAGEIF
- AVERAGEIFS