Formulas
VimSheet supports a full-featured formula engine with over 100 built-in functions and dependency tracking.
Entering Formulas
Start a cell with = followed by the formula expression:
=SUM(A1:A10)
=AVERAGE(B1:B20)
=IF(A1 > 10, "High", "Low")
=VLOOKUP(D5, A1:B100, 2, FALSE)
Cell References
Reference |
Description |
|---|---|
|
Relative reference |
|
Absolute reference |
|
Mixed (column absolute, row relative) |
|
Mixed (column relative, row absolute) |
|
Range reference |
|
Cross-sheet reference |
Paste Behavior
When you yank a formula cell and paste with p, cell references are
adjusted relative to the destination cell:
Relative row (e.g.
A1) — row number is set to the destination cell’s row: yanking=B2from D1 and pasting to D3 produces=B3.Relative column (e.g.
A1) — column letter is shifted by the column offset between source and destination: yanking=B2from D1 and pasting to E1 produces=C2.Absolute (e.g.
$A$1) — never changed.Mixed — the locked part is preserved, the unlocked part is adjusted:
$A1keeps columnAbut the row is set to the destination row;A$1keeps row1but the column shifts.
Pasting with P pastes the formula exactly as yanked — no adjustment
is applied.
Operators
Operator |
Description |
|---|---|
|
Arithmetic |
|
Exponentiation |
|
String concatenation |
|
Comparison |
|
Range operator |
|
Union operator |
Dependency Tracking
VimSheet automatically builds a dependency graph when you enter formulas. When a cell’s value changes, all dependent cells are recalculated in topological order. This ensures correct results even with complex chains of dependencies.
A1 = 10
A2 = A1 * 2 → 20
A3 = A2 + A1 → 30
Changing A1 to 20 → A2=40, A3=60
Circular references are detected and reported as #CIRC errors.
HTTP Data Fetching
Fetch live data from the web with the @FETCH function:
=FETCH("https://api.example.com/data")
=FETCH("https://api.example.com/data", 60, "$.temperature")
=FETCH("https://api.example.com/data", 300, "results[0].value")
The function takes: - url — the URL to fetch - refresh_seconds (optional) — how often to refresh in the background - json_path (optional) — dot/bracket notation to extract a specific value
Array and object responses automatically spill into adjacent cells.
Use :fetchlist to see all active fetches, :fetchnow to
immediately refresh, and :fetchstop to stop all background fetches.
See Formula Functions for the complete function reference.