Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets Formulas and Functions: A How-To Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To use formulas and functions in Google Sheets, start every calculation with an equals sign (=), then type either a simple arithmetic expression like =A1+B1 or a function name followed by parentheses, such as =SUM(A1:A10). Press Enter to run it. That covers the basics; the rest of this guide shows you how to build reliable formulas, copy them safely, and fix the errors you will inevitably hit.

What You'll Need

  • A Google account and access to Google Sheets (sheets.google.com or the mobile app).
  • A spreadsheet with at least a few rows of data to practise on. You can create a blank one in seconds.
  • Basic familiarity with cell references (A1, B2) and the difference between rows and columns.

Menu labels and button names can differ slightly between the desktop web version and the mobile apps, and between Google Workspace editions. The steps below are written for the desktop browser version unless stated otherwise.

Step-by-Step

  1. Open your spreadsheet and click an empty cell. This is where the formula will live. You can type directly into the cell or into the formula bar at the top.
  2. Type an equals sign (=). Nothing calculates without it. If you type 2+2 and press Enter, Sheets stores the text "2+2". If you type =2+2, it returns 4.
  3. Build a simple arithmetic formula first. Click cell A1, type =, then click cell B1, type +, click C1, and press Enter. The result appears in A1 and the formula bar shows something like =B1+C1. This teaches you that formulas reference cells, not just numbers.
  4. Use a function for ranges. Click an empty cell below a column of numbers and type =SUM( then drag to select the cells, or type the range like B2:B10, then close the parenthesis and press Enter. SUM adds everything in the range. Other everyday functions: AVERAGE for the mean, COUNT for how many numbers, COUNTA for non-empty cells, MIN and MAX for the smallest and largest values.
  5. Let autocomplete help you. When you type = and the first letters of a function, Sheets shows a list. Use the arrow keys and Tab or Enter to insert the function name and its opening parenthesis. This reduces typos in long names like VLOOKUP or XLOOKUP.
  6. Copy formulas with relative and absolute references in mind. If you copy =B2*C2 down a column, the row numbers adjust automatically (B3*C3, B4*C4). If you need a fixed cell, such as a tax rate in E1, write =B2*$E$1. The dollar signs lock the column and row so the reference does not shift when copied.
  7. Use IF for decisions. =IF(A2>=60,"Pass","Fail") returns Pass when A2 is 60 or more, otherwise Fail. Text results go in double quotes. You can nest IFs, but for more than two or three conditions consider IFS or SWITCH to keep the formula readable.
  8. Look up values with VLOOKUP or XLOOKUP. VLOOKUP searches the first column of a range and returns a value from a specified column: =VLOOKUP(D2,A2:B10,2,FALSE). The FALSE means exact match, which you almost always want. XLOOKUP is more flexible and does not require the search column to be first: =XLOOKUP(D2,A2:A10,B2:B10). If your version of Sheets does not offer XLOOKUP, use VLOOKUP or INDEX/MATCH.
  9. Combine text with & or CONCATENATE. =A2&" "&B2 joins first and last names with a space. TEXTJOIN does the same for a whole range with a delimiter: =TEXTJOIN(", ",TRUE,A2:A10).
  10. Check your work with the formula bar. Click any result cell and read the formula bar to confirm the references point where you think. Press Ctrl+` (the key left of 1 on most keyboards) to toggle showing all formulas instead of results; press it again to switch back.
  11. Handle errors deliberately. Wrap risky formulas in IFERROR: =IFERROR(VLOOKUP(D2,A2:B10,2,FALSE),"Not found"). This replaces ugly #N/A errors with a clean message.
  12. Freeze and protect what matters. If others will edit the sheet, consider protecting formula cells via Data > Protect sheets and ranges so a stray keystroke does not wipe out your logic.

Common Mistakes

  • Forgetting the equals sign. The most common reason a formula "does nothing" is that it was typed as text.
  • Mismatched parentheses. Every opening parenthesis needs a closing one. Sheets colours them to help you match pairs.
  • Using relative references where absolute are needed. Copying a formula that should always point at one cell without $ signs produces wrong results quietly.
  • VLOOKUP with approximate match. Leaving out the fourth argument or using TRUE can return a plausible but wrong value. Use FALSE for exact matches.
  • Text that looks like numbers. Values imported from other systems may be stored as text, so SUM returns 0. Check with ISNUMBER or convert via Format > Number.
  • Circular references. A formula that refers to its own cell (directly or through a chain) triggers a circular dependency error. Trace the chain and break it.
  • Hard-coding numbers inside formulas. Putting a rate like 0.2 directly into dozens of formulas makes updates painful. Store it in one cell and reference it.

Tips

  • Name key cells or ranges (Data > Named ranges) so formulas read like =Price*Quantity instead of =B2*C2.
  • Use ARRAYFORMULA to apply one formula to an entire column, e.g. =ARRAYFORMULA(B2:B100*C2:C100).
  • Press Ctrl+Enter (Cmd+Enter on Mac) to fill the selected range with the formula you just typed.
  • Use QUERY for SQL-like summaries: =QUERY(A1:C100,"select A, sum(C) group by A",1).
  • Keep one formula per concept. If a formula is unreadable, split it into helper columns and hide them.
  • Use conditional formatting to flag error values or outliers visually, rather than scanning manually.

Troubleshooting

If a formula returns #REF!, a referenced cell or sheet was deleted or moved. Undo (Ctrl+Z) or rewrite the reference. #VALUE! usually means you are doing arithmetic on text; check the cell types. #DIV/0! means the denominator is zero or empty; wrap with IFERROR or guard with IF. #NAME? means Sheets does not recognise a function name, often a typo or a function not available in your locale; check spelling and comma versus semicolon separators (some regions use semicolons). #N/A from lookups means no match was found; confirm the search value exists and there are no leading or trailing spaces. If a formula shows as text, remove the leading apostrophe or reformat the cell as automatic. If results look stale, check File > Settings > Calculation for recalculation settings, and press Ctrl+Shift+F9 to force a full recalculation. If the sheet is shared and someone else's edit broke a formula, use File > Version history to see and restore an earlier version.

Frequently Asked Questions

What is the difference between a formula and a function?

A formula is any expression starting with =, including simple arithmetic like =A1+B1. A function is a built-in operation such as SUM or IF that you call by name inside a formula.

Why does my SUM return 0?

The numbers are probably stored as text. Select the range, use Format > Number > Automatic, or check with =ISNUMBER(A1). Imported data often carries hidden spaces or apostrophes.

How do I copy a formula down a whole column?

Select the cell with the formula, grab the small square at the bottom-right corner (the fill handle), and drag down. Or select the range and press Ctrl+D to fill down.

Can I use formulas on the Google Sheets mobile app?

Yes. Tap a cell, tap the formula bar or the function icon, and type the formula. Autocomplete and function suggestions are more limited than on desktop, so complex formulas are easier to build in a browser.

Why do I see a circular dependency error?

A formula refers back to its own cell, directly or through other cells. Find the loop and change one reference to a cell outside the cycle.

How do I stop #N/A errors from showing?

Wrap the lookup in IFERROR, for example =IFERROR(VLOOKUP(...),"Not found"). This replaces the error with whatever text or value you choose.