Broken formulas in an inherited Sheet fixed with Gemini

The struggle: You inherit a spreadsheet full of #REF! and #N/A errors, and nobody can tell you what the formulas were meant to do.

What you end up with: A working copy of the sheet with errors fixed, plus a note on what each key formula does.

Gemini in Sheets can fix an error cell and explain a range in plain words. You work on a copy, fix one error type at a time, and test each fix against a number you trust.

Tools: Gemini. Level: Pro. Time: 1 hour.

Use it if

  • You took over a model or tracker built by someone who left
  • Errors spread through many cells and you cannot see the cause
  • You need to understand the logic before you change anything

Skip it if

  • The numbers go into a filing or tax return without a person checking the logic
  • The file is an Excel .xlsx you cannot convert, because Gemini works best on native Sheets

What you need first

  • Gemini in Sheets, which needs an eligible Google Workspace or Google AI plan
  • A copy of the sheet: File, Make a copy. If it is an .xlsx file, choose File, then Save as Google Sheets first

The method

  1. Work on a copy and ask for a summary (Gemini: Google Sheets)

    Make a copy of the sheet and rename it with today's date. Click Ask Gemini at the top right and paste the prompt. Gemini lists what each tab does.

    Prompt to copy:

    Summarize this spreadsheet. For each tab say what it is for, what the main inputs are, and which tabs feed which. Then list the cells or ranges that show errors such as #REF!, #N/A or #DIV/0!, grouped by error type. If you cannot tell, say so.

    You get: A plain description of every tab.

    Tip: The conversation is lost when you reload the page, so copy useful answers into a notes tab.

  2. Explain a range before you touch it (Gemini: Ask Gemini)

    Select the range around the first error and ask Gemini what the formulas do. Do this before fixing, because a #REF! often points to a deleted column.

    Prompt to copy:

    Explain in plain words what the formulas in [range] do, step by step. Say which cells they refer to and what a #REF! in this range would mean. Then give one example using the values in row [number].

    You get: The meaning of each formula in your own words.

    Tip: Ask for the formula in plain words and an example with real numbers, then check one by hand.

  3. Fix one error type at a time (Gemini: Fix)

    Hover over an error cell and click Fix. Read the proposed formula, and click Apply only if it matches what the explanation says the formula should do. Use Undo if the result looks wrong, then move to the next error type.

    Prompt to copy:

    The formula in [cell] shows [error]. Based on the sheet, suggest what it was meant to calculate and give a corrected formula. Show the result for row [number] and say what assumption you made. If you are not sure, offer two options.

    You get: Errors fixed one type at a time, each checked.

    Tip: Pick a cell whose correct value you know, and compare the fixed result with it.

  4. Test against a number you trust (Gemini: Google Sheets)

    Compare a total with a figure you know, such as last month's report. Then put a notes tab in the sheet with what you changed, why, and the date, so the next person is not stuck.

    You get: A fixed sheet with a change log.

    Tip: Write the change log before you move on, or you will forget what you did.

Where this goes wrong

  • Test each fix on the copy first and never on the original sheet
  • Gemini can propose a formula that returns a number but means something else; compare with a known result before trusting it; charts made from generated data do not update when the source changes
  • If the file has out-of-domain users, Gemini's content may be visible outside your domain
  • Have a qualified person check this before you sign, file or send it. Use this for any sheet behind accounts, tax or a filing.

Sources

More like this

Updated . Written with AI help and checked by an independent review step, as described in our editorial standards.