Google Sheets formulas: the practical guide to writing them correctly

Learn the parts of a formula, how cell references behave and how to check a result before filling it down.

Google Sheets formulas — SheetSteps
QUICK ANSWER

Begin with an equals sign, write the function or calculation, and test it on one known row. Lock any fixed row or column with dollar signs before copying the formula.

Before you write and check a Google Sheets formula, set up a clean source range and one result you can check by hand. That gives you a known answer before the sheet grows.

This article shows how to write and check a Google Sheets formula. The sample sheet uses ordinary rows so you can copy the method into an existing file without rebuilding everything.

Google Sheets formulas spreadsheet used in this article
A working sheet built for this article. The numbers are sample data.
01
INSTRUCTIONS

Google Sheets formulas: the practical guide to writing them correctly

  1. 01
    Make a safe copy

    Duplicate the source tab or file before changing formulas, ranges or formatting.

  2. 02
    Set up the source rows

    Add the fields needed to write and check a Google Sheets formula. Keep one record on each row and one field in each column.

  3. 03
    Add the method

    Enter =IF(C2="Paid",B2,0) in a test cell and check its first result.

  4. 04
    Check a known case

    Pick one row whose answer you already know and compare it with the sheet result.

  5. 05
    Test the awkward rows

    Check blanks, zeros, repeated entries and one row that should not match.

  6. 06
    Apply it to the full range

    Copy the formula or rule only after the sample cases return the expected result.

02
FORMULAS

Set up the sheet for Google Sheets formulas

Keep the source table rectangular. A single header row, no merged cells and consistent cell types make the work much easier to check.

Place settings, fixed rates or allowed labels on a separate tab. Name them clearly so another person can read the file without tracing every cell.

  • Start every formula with =
  • Test one known row first
  • Check relative and fixed references
  • Fill down only after the first result is right
03
FORMULAS

Check the first result before copying it

A result that looks plausible can still be wrong. Work through one row manually, compare it with the Sheet and check every referenced cell.

Next, test a blank row and an unusual row. These two checks catch many range, type and copied-reference mistakes before they spread.

fx=IF(C2="Paid",B2,0)
04
FORMULAS

Keep the file reliable as new rows arrive

Leave input columns visually separate from calculated columns. Protect formulas when several people edit the same file, and keep dropdown lists or settings outside the main table.

Add a short check near the result: row count, unmatched count, last refresh time or a manual spot check. The right check depends on the job, but it should make a bad update easy to notice.

05
COMMON QUESTIONS

Questions people ask

Why does a formula show as text?

The cell may use Plain text format or have an apostrophe before the equals sign. Set the cell to Automatic and enter the formula again.

What does $ mean in a formula?

A dollar sign fixes a row, a column or both when the formula is copied.

How do I see all formulas in a Sheet?

Use View → Show → Formulas, or press Ctrl plus the grave accent shortcut on many keyboards.

READ NEXT

More from SheetSteps