Google Sheets formula disappeared or got overwritten? How to get it back (and stop it)

A total stopped updating, or a cell that used to calculate now just holds a number. Someone typed over it, pasted a block on top of it, or sorted a range the wrong way. The formula is almost always recoverable. Here is how, in the order you should try things.

1. Undo, if it just happened

If the change was yours and only a moment ago, press Ctrl + Z (Cmd + Z on Mac). Know the limits before you rely on it:

If any of those apply, skip to edit history.

2. Restore one cell with edit history

This is the fastest fix for a single overwritten formula and it touches nothing else in the file.

  1. Right-click the cell that lost its formula.
  2. Choose Show edit history.
  3. Use the arrows in the pop-up to step back through earlier values. Each entry shows who changed it and when.
  4. When you reach the version that still has the formula, copy it, close the pop-up and paste it back (or retype it).

Edit history works per cell, so it is ideal when one or two cells were hit. It does not show changes caused by sorting or by rows being inserted or deleted, and some bulk pastes appear as a single entry. If the cell shows nothing useful, go to version history.

3. Use version history for bigger damage

When a whole column was pasted over, or you don't know which cells changed, open File > Version history > See version history (Ctrl + Alt + Shift + H).

  1. Pick a version from before the damage in the right-hand list. Turn on Show changes to highlight what differs.
  2. Do not click "Restore this version" yet. That rolls back the entire file, including every good edit your team made since.
  3. Instead, click the cells you need in the old version, copy the formulas, go back to the current file and paste them in.
  4. If the damage is huge, use Make a copy on the old version, then copy whole columns of formulas across from the copy.

Only use "Restore this version" when nothing worth keeping has happened since. You can name versions (File > Version history > Name current version) before big edits so they are easy to find next time.

4. Find every formula that became a hardcoded value

Overwrites rarely come alone. Before you call it fixed, check what else turned into a static number.

Show formulas

Press Ctrl + ` (backtick, top-left of most keyboards) or go to View > Show > Formulas. Every cell now displays its formula instead of its result. In a column that should be all formulas, a plain number stands out at once. Press it again to switch back.

ISFORMULA helper column

For long sheets, add a temporary column next to the one you are checking. If your totals are in column F starting at row 2, put this in G2 and fill down:

=ISFORMULA(F2)

Any FALSE in a column that should be calculated is a formula that was overwritten. Filter on FALSE to list them, restore each one, then delete the helper column. To check a whole block at once, use conditional formatting with the custom formula =NOT(ISFORMULA(F2)) to colour every hardcoded cell red.

5. Stop it happening again

Once the formulas are back, protect them so the next paste bounces off.

Native protection has one gap: anyone who owns the file, or who you grant edit rights on the range, can still overwrite it, and warning-only ranges are clicked through quickly once people get used to them.

If you would rather not do this again

FormulaLock is a Google Sheets add-on that locks formulas in one click and puts them back automatically when someone overwrites one, with a log of what was restored and when. No version-history digging. It is $19 once, see pricing, with a 14-day refund.

Honest note: auto-restore catches edits typed or pasted in the Sheets interface. Imports, other scripts and API writes are not caught, so version history is still your backstop. Full limits.

Try FormulaLock free