Skip to main content

Avoid recalculations

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.

How to control recalculations

warning

Do not move cells or sort your sheet while formulas are loading.

GPT for Sheets offers a variety of options to control recalculations. These options vary based on the model in use and your preference for a temporary or permanent solution:

  • To save results permanently and prevent formula reloading:

  • To store results inside formulas enable safe mode. This method is currently reserved to GPT-4 and GPT-4 Turbo models and the GPT_WEB function. It cannot handle more than 2000 executions launched in parallel.

  • To prevent new executions in your spreadsheet, pause GPT formulas.

  • To prevent further spending in any of your spreadsheets, turn spending off. Auto-refreshes can still happen and cause data loss but will no longer incur costs. Replace formulas or use safe mode to avoid data loss.

What triggers formula recalculation

The following triggers cause your GPT formulas to recalculate in your spreadsheet:

Recalculation TriggerWhat cells get recalculated
Google Sheets automatically reloads your spreadsheet every few hoursAll GPT formulas
Sorting data in your sheetOnly the relocated GPT formulas
Undoing the deletion of a GPT formula from a cellOnly the restored GPT formula
Moving a GPT formula to a different cellOnly the relocated GPT formula
Adding or moving a row/column positioned before a cell containing GPT formulasGPT formulas in subsequent rows/columns
Opening the spreadsheet, particularly if it hasn't been accessed recentlyPotentially all GPT formulas