Learn Without Walls
← Module 01: Getting Started 🏠 Course Home Module 03: Logic & Lookup →
Module 02 of 08  |  Excel & Google Sheets for Data

➕ Formulas & Functions

Formulas are what turn a spreadsheet from a fancy table into a powerful calculator. Learn how to write them, use the most important built-in functions, and understand why cell references are the key to everything.

⏰ ~35 minutes 🎓 Beginner 📋 Requires: Module 01
📌 Before You Start
Open your spreadsheet

Open sheets.google.com and create a new blank spreadsheet. You'll build a grades dataset during this module. Keep it open as you read — practice each formula as you go. Learning formulas is like learning to ride a bike: you have to try it, not just watch.

💡 The Concept
How Formulas Work

Every formula in Google Sheets (and Excel) starts with an equals sign =. This is the signal that tells Sheets: "this isn't a label or a number — it's a calculation."

= 2 + 3 → result: 5 = A1 + B1 → adds the values in cells A1 and B1 = SUM(A1:A10) → adds all values from A1 to A10 = AVERAGE(B2:B11)→ calculates the mean of B2 through B11

Notice the colon : — it means "from...to". So A1:A10 is cells A1, A2, A3, A4, A5, A6, A7, A8, A9, and A10 — ten cells at once. This is called a range.

When you type a formula and press Enter, Sheets calculates it and shows the result in the cell. To see the formula again, click the cell — it appears in the formula bar at the top.

📋 Sample Data — Grades Dataset
Type This Into Your Spreadsheet (Row 1 = Headers)
A — StudentB — MidtermC — FinalD — Average
Alice Johnson8892(formula here)
Bob Martinez7480
Chloe Kim9598
David Okafor6170
Emma Patel8285
Felix Nguyen9088
Grace Lee5562
Hassan Ali7875
Isabella Cruz8791
James Park9396

Type exactly as shown — A1 = "Student", B1 = "Midterm", C1 = "Final", D1 = "Average". Data goes in rows 2–11. Leave column D empty for now — you'll fill it with a formula.

🔧 Step-by-Step
The Six Essential Functions

SUM — Add everything up

Adds all numbers in a range. The most-used function in all of spreadsheet history.

= SUM(B2:B11) → total of all midterm scores = SUM(B2, C2) → sum of just two specific cells

Try it: Click on cell B13. Type =SUM(B2:B11) and press Enter. You should get 803.

AVERAGE — Find the mean

Calculates the arithmetic mean (sum divided by count). Ignores empty cells.

= AVERAGE(B2:B11) → mean midterm score = AVERAGE(B2:B11, C2:C11) → mean of both columns combined

Try it: In B14, type =AVERAGE(B2:B11). You should get 80.3.

COUNT — Count numeric cells

Counts how many cells in a range contain numbers. Empty cells and text are ignored.

= COUNT(B2:B11) → how many students have a midterm score

Useful when you want to know how many data points you actually have.

COUNTA — Count non-empty cells

Counts cells that are not empty — including text cells. Use this to count names, labels, or any non-blank entry.

= COUNTA(A2:A11) → how many students are listed (counts text)

COUNT ignores text. COUNTA counts everything that isn't blank.

MIN and MAX — Lowest and highest values

Find the smallest or largest number in a range.

= MIN(B2:B11) → lowest midterm score (55) = MAX(B2:B11) → highest midterm score (95) = MAX(B2:B11) - MIN(B2:B11) → the range (spread) of scores
💡 The Concept
Relative vs. Absolute References — The Most Important Idea in Formulas

When you copy a formula to another cell, Sheets adjusts the cell references automatically. This is called a relative reference — and it's usually exactly what you want.

🔄 Relative Reference: =B2+C2

When copied down one row, becomes =B3+C3. The reference moves with you. This is the default. Great for repeating a formula down a column.

🔒 Absolute Reference: =$B$2+C2

The $ signs lock the reference. $B$2 will always refer to cell B2, no matter where you copy the formula. Use when you want to multiply everything by a single fixed value.

Mixed references are also possible: $B2 locks the column but not the row; B$2 locks the row but not the column.

How to add $ signs quickly: Click on a cell reference in the formula bar, then press F4 to cycle through: B2$B$2B$2$B2 → back to B2.

Worked Example: Average per Student

In cell D2, type:

= AVERAGE(B2:C2)

This averages Alice's midterm (B2) and final (C2). Now copy cell D2 and paste it into D3:D11. Watch how Sheets automatically changes it to =AVERAGE(B3:C3), =AVERAGE(B4:C4), etc. That's relative references at work.

When Would You Use Absolute? A Tax Rate Example

Suppose cell F1 holds a tax rate (0.08). You want to calculate tax for prices in column E:

= E2 * $F$1 ← locks F1 so it doesn't shift when copied down

If you used =E2*F1 instead and copied down, row 3 would show =E3*F2 — which would be wrong because F2 is empty.

🔧 Step-by-Step
AutoSum — Insert SUM (or Other Functions) in One Click
  1. Click the cell where you want your total — for example, B12 (just below your last data row).
  2. In Google Sheets: go to Insert → Functions → SUM. Sheets will guess your range and insert =SUM(B2:B11) automatically.
  3. In Excel: click the AutoSum button (Σ) in the Home tab. It does the same thing.
  4. Press Enter to confirm. Press Tab instead to confirm and move right to the next cell.
Tip: In Google Sheets, you can also type =SUM( and then click and drag to select the range with your mouse. Sheets fills in the range as you drag.
🖐 Your Turn
Exercise: Product Sales Analysis

Create a new sheet (click the + at the bottom) and enter this sales data:

A — ProductB — Units SoldC — Price ($)D — Revenue ($)
Laptop Stand4529.99
USB Hub12015.50
Webcam3079.00
Keyboard6049.99
Mouse Pad2008.99
Monitor Arm2255.00
Headphones7534.99
Desk Lamp9024.00

Tasks:

  1. In column D, write a formula for Revenue = Units × Price. Use a relative reference formula starting in D2: =B2*C2. Copy it down to D9.
  2. In a summary area (rows 11–16), calculate:
    • Total Revenue: =SUM(D2:D9)
    • Average Sale: =AVERAGE(D2:D9)
    • Number of Orders: =COUNT(D2:D9)
    • Max Revenue: =MAX(D2:D9)
    • Min Revenue: =MIN(D2:D9)
  3. Format your headers in bold with a green background and white text.
Expected Total Revenue: $13,524.30. Check your formula — if you get something different, make sure you multiplied Units × Price and not something else.
Hint: To copy D2 down, click D2, then press Ctrl+C, select D3:D9, then press Ctrl+V.
🧠 Brain Break
Why Does = Start Every Formula?

You might wonder: why does every formula start with =? The reason is disambiguation. When you type "123" in a cell, is that a number or the text "one hundred twenty-three"? Sheets treats it as a number. When you type "SUM(A1:A10)", is that a label or a function call? Without the =, Sheets treats it as text. The equals sign is your way of saying: "this is a calculation, not data."

Fun fact: In some older spreadsheet programs, you used @ instead of = for functions — for example @SUM(A1..A10) in Lotus 1-2-3. Excel kept backward compatibility for years by accepting both. Google Sheets accepts only =.

✅ Wrap Up
Module 02 Key Takeaways

Next: Module 03 — Logic & Lookup Functions →