Variables & Line References
Because words make more sense than un-named numbers.

Declaring a variable

Soulver lets you create variables like in a programming language. You "declare" a variable with the equals symbol '='.
1
discount = 10% | 10%
2
cost = $550 | $550
3
cost - discount | $495.00
Copied!
Variable can be a single word or an entire phrase.
You can't use a variable before it has been declared. This behaviour matches most programming languages.

Changing variables' values

A variable can be redefined by simply giving it a new value. The most recently defined value will be used on subsequent lines.
1
monthly rent = $1,900 // 2018 | $1,900
2
monthly rent = $2,150 // 2019 | $2,150
3
|
4
monthly rent / 4 people | $537.50
Copied!
You can 'peek' at a variable's current value by holding down the shift key, and hovering over the variable.

Auto-completing

Instead of typing out a long variable name, you can hit the escape key and return to auto-complete the variable.
Press escape to autocomplete long variable names

Global variables

You can make variables that work across all your sheets. Go to Preferences > Calculator > Global variables and add a new variable by clicking the plus button.

Line References

Soulver lets you reference previous lines' answers in your calculations, like a spreadsheet. You can go back and edit a previous line, and any lines that refer to will recalculate automatically.

To reference a previous line:

1. Drag in the answer from the line you want to reference:
Dragging in a previous line to make a line reference
You can also just double click the answer to insert a reference to it
2. Type an operator (like +) immediately after typing return to start a new line:
Typing an operator after return to make a line reference.
You can also insert a reference to the previous line using the keystroke ⌘\.
Note: you can only reference a line above your current line.
If you want to disable a reference, but keep an expression in its current state, you can right-click on a reference and choose 'Unlink'.
Last modified 2mo ago