Excel · Basics
Excel from zero: grid, ranges, and your first formula
Lesson 1 starts with VLOOKUP, and it assumes two things: you can type a table into a sheet, and you can write a formula. This lesson builds that floor in ten minutes.
The one picture: every cell has an address
Cells and ranges: the addressing system
A cell address is a column letter plus a row number, like a map coordinate: A1, D4. A range is a rectangle of cells, written as top-left : bottom-right. The colon means "to". You will write these constantly, because every function and every lookup takes a range.
| You write | It means |
|---|---|
A1 | One cell: column A, row 1. |
A2:D6 | A rectangle from A2 to D6. In the picture above: the whole employee table, without the header row. |
$A$2:$D$6 | The same rectangle with the $ locks. It survives a copy. This is the range Lesson 1 uses in every VLOOKUP. |
Two shortcuts: click a cell and its address appears in the Name Box (top-left). Type an address into the Name Box, and Excel jumps there.
Typing data: the left/right rule
Click a cell, type, and press Enter (the selection moves down) or Tab (it moves right). Excel guesses the type of what you typed, and the guess is visible:
- Text sits on the left of the cell.
E101,Asha,Sales. - Numbers and dates sit on the right.
52000,05-Jan.
This alignment is a free health check. If a number sits on the left, Excel stored it as text, and SUM will skip it. In an interview, "why is my total wrong?" often means "one number is stored as text".
=. Type SUM(D2:D6) without it, and Excel stores the words, not a calculation. Common causes of text-numbers: a leading apostrophe ('52000), a stray space, or a paste from a web page. To edit a cell instead of replacing it, press F2 or double-click it.Your first formula, and what a function is
A formula is anything you type that starts with = and calculates: =D2+D3, =D2*$G$2, =(D2+D3)/2. Excel follows normal arithmetic order: multiplication and division before addition and subtraction. Brackets remove all doubt.
A function is a ready-made formula with a name. You call it inside a formula, and it takes a range in brackets:
| Function | What it does | On your table (D2:D6) |
|---|---|---|
=SUM(D2:D6) | Adds the range | 276000 |
=AVERAGE(D2:D6) | Mean of the range | 55200 |
=MIN(D2:D6) · =MAX(D2:D6) | Smallest · largest | 45000 · 70000 |
=COUNT(D2:D6) | Counts the numeric cells | 5 |
Syntax from Microsoft: SUM function. Lesson 3 adds the multi-condition versions (SUMIFS, COUNTIFS) and IF/IFERROR.
Copy it down: relative vs absolute references
You type one formula and copy it down for every row. The references behave in two ways, and this is the whole trick:
$ signs. Lock a rate, a tax slab, or a target that lives in one cell.Excel stores 10% as 0.1 and only changes the display. The % button on the ribbon is a format, not a calculation. Same for currency: the value stays a plain number.[MS]
Error values are clues, not disasters
| Error | It means | Typical cause |
|---|---|---|
#N/A | The value was not found | A lookup key that does not exist (Lesson 1) |
#DIV/0! | Division by zero | A blank or zero cell in the divisor[MS] |
#VALUE! | Text where a number must be | Arithmetic on a text-number, like "52000" |
#REF! | The reference no longer exists | A row or column it pointed to was deleted |
Read the error before you hide it. IFERROR (Lesson 3) replaces the message, and it hides real mistakes just as well as expected ones.
Retrieval check
You see A2:D6 in a formula. What does it cover?
You type 61000 and it appears on the LEFT of the cell. Why?
F2 holds =D2*$G$2. You copy it down to F3. The new formula is …
A cell shows #N/A. What does it mean?
What must every formula start with?
Type it
Write the formula for the total salary of D2:D6.
Asha's bonus: salary in D2, rate in G2. Write the formula.
Write the range for the whole table: all four columns, the five data rows, no header.
Your turn
- Open Excel or Google Sheets. Type the table from the picture into
A1:D6, headers in row 1. - Type
=SUM(D2:D6)below the table. Confirm 276000. Now break it: type a space before one salary and watch the total change. - Put
10%in G2. Write=D2*$G$2in F2 and drag the fill handle down to F6. Check the five results: 5200, 4800, 6100, 4500, 7000. - Type
'12345(apostrophe first) in an empty cell. Watch it go left. Then fix it without retyping. - Make a
#DIV/0!on purpose:=D2/0. Read it, then fix it. - Close this page and say the "Say it in the interview" answer out loud from memory.
Go deeper
Related: Lesson 1: VLOOKUP & HLOOKUP · Lesson 3: Pivots & core formulas · Excel cheat sheet