Sheets: avoid unexpected costs
Google Sheets automatically recalculates all formulas in the following cases:
- If you move columns or rows around, or sort your rows
- Automatically every few hours when you don’t touch your spreadsheet, even if it is not opened
This includes GPT formulas and can lead to unexpected costs and result loss. To minimize the impact, you can:
- Replace your formulas
- Automatically replace formulas with their results (currently reserved to gpt-4 and gpt-4-turbo models and the GPT_WEB function)
- Manually replace formulas with their results in selected cells or across an entire sheet
- Limit parallel executions
Do not run more than 2000 executions in parallel unless you really know what you're doing. Deleting loading formulas won't prevent them from being executed, unless you're using Safe mode. - Store formula results
- Use the cache by default most of the time.
- Alternatively, use Safe mode if you also need to prevent timeouts, notably when you're expecting long generations, using OpenAI Assistants or models that are very slow like gpt-4-turbo or gpt-4.
- Pause your formulas
Pause your GPT formulas to avoid new executions in your spreadsheet - Estimate your cost
Use the calculator to estimate what your use case will cost you by entering your input and output
warning
Do not delete, move cells, or sort your sheet while formulas are loading.
What triggers formula recalculation
The following triggers cause your GPT formulas to recalculate in your spreadsheet:
Recalculation Trigger | What cells get recalculated |
---|---|
Google Sheets automatically reloads your spreadsheet every few hours | All GPT formulas |
Sorting data in your sheet | Only the relocated GPT formulas |
Undoing the deletion of a GPT formula from a cell | Only the restored GPT formula |
Moving a GPT formula to a different cell | Only the relocated GPT formula |
Adding or moving a row/column positioned before a cell containing GPT formulas | GPT formulas in subsequent rows/columns |
Opening the spreadsheet, particularly if it hasn't been accessed recently | Potentially all GPT formulas |