Data Analysis · Tutorial 1 of 5
Excel Formulas Every Data Analyst Needs First
By the FUTEAC Team · 25 October 2026 · 10 min read · Beginner
In short
Every analysis an Excel beginner needs starts with six formulas: SUM and AVERAGE to total and average a column, COUNT and COUNTIF to count rows, IF to label results, SUMIF to total only the rows that match a condition, and VLOOKUP (or XLOOKUP) to fetch a value from another table. Learn these six on one sheet.
- Every formula starts with
=.=SUM(D2:D6)is a formula;SUM(D2:D6)without the=is just text in a cell. - A range is two corners with a colon.
D2:D6means every cell from D2 down to D6; the formula updates itself when the numbers change. IFturns a number into a judgement.=IF(D2>7000,"Strong","OK")labels each row so a human can scan the result.- Lookups join tables.
VLOOKUPfinds a row by its label and returns a value from another column. - This tutorial feeds the Spreadsheets for Data Analysis course (/course/spreadsheets-for-data-analysis) and the Excel Formulas skill (/skill/excel-formulas).
Before you start
The sample sheet we will use
Type this small shop sales sheet into Excel or Google Sheets, exactly as shown — every result below is worked out on these numbers. Row 1 is the header; column D starts empty.
| A — Product | B — Units | C — Price | D — Total | |
|---|---|---|---|---|
| 2 | Tea | 40 | 150 | |
| 3 | Coffee | 25 | 300 | |
| 4 | Sugar | 60 | 120 | |
| 5 | Biscuits | 35 | 200 | |
| 6 | Milk | 50 | 180 |
Before any analysis, fill column D — the total for each product is units × price. Click D2 and type:
=B2*C2Then copy D2 down to D6 (or drag the fill handle at D2's bottom-right corner). The sheet now shows:
| Product | Units | Price | Total |
|---|---|---|---|
| Tea | 40 | 150 | 6000 |
| Coffee | 25 | 300 | 7500 |
| Sugar | 60 | 120 | 7200 |
| Biscuits | 35 | 200 | 7000 |
| Milk | 50 | 180 | 9000 |
Two things to notice. First, B2*C2 uses *references* (B2, C2), not the numbers 40 and 150 — change the units for Tea to 50 and D2 updates itself to 7500. That is the whole point of formulas: the sheet stays correct when the data changes. Second, * means multiply in a formula, and every formula begins with =.
How do I total and average a column? SUM and AVERAGE
Below the table, in row 8, type the label Total sales in A8 and Average units in A9 — then the formulas.
In D8:
=SUM(D2:D6)D2:D6 is a *range*: every cell from D2 to D6. SUM adds them: 6000 + 7500 + 7200 + 7000 + 9000 = 36700.
In B9:
=AVERAGE(B2:B6)AVERAGE adds the units and divides by how many there are: (40 + 25 + 60 + 35 + 50) ÷ 5 = 210 ÷ 5 = 42. The average product sold 42 units.
Expected result: D8 shows 36700, B9 shows 42. If D8 shows 0, check the range and that the cells contain numbers, not text.
How do I count things? COUNT and COUNTIF
Counting asks: how many rows are there, and how many meet a condition?
In B10, next to a label Products listed:
=COUNT(B2:B6)COUNT counts cells that contain numbers: five rows have units, so the answer is 5. Note: COUNT ignores text — it counts numbers only.
In B11, next to Products selling over 40 units:
=COUNTIF(B2:B6,">40")COUNTIF counts only the cells that pass a test. The test ">40" is in quotes because it is text describing a condition, not a number. Units over 40 are Sugar (60) and Milk (50) — two products — so the answer is 2.
How do I label a result? IF
Numbers are hard to scan; labels are easy. IF tests a condition and returns one value when it is true and another when it is false. In E2, next to Tea:
=IF(D2>7000,"Strong","OK")D2 is 6000, so E2 shows OK. Copy E2 down to E6:
| Product | Total | Label |
|---|---|---|
| Tea | 6000 | OK |
| Coffee | 7500 | Strong |
| Sugar | 7200 | Strong |
| Biscuits | 7000 | OK |
| Milk | 9000 | Strong |
Biscuits is exactly 7000, and >7000 is strictly greater than — so it is "OK". That boundary is the classic IF trap: if you meant "7000 or more", the test must be >=7000.
How do I total only some rows? SUMIF
SUM totals everything; SUMIF totals only the rows that match a condition. In D9, next to the label Tea sales only:
=SUMIF(A2:A6,"Tea",D2:D6)Read it as: in A2:A6, find rows equal to "Tea"; add the matching cells from D2:D6. Only row 2 matches, so the answer is 6000.
With one product this looks trivial, but the same formula answers real questions on a bigger sheet: =SUMIF(A2:A100,"Coffee",D2:D100) totals every Coffee row in a hundred-row sales list without you finding them by hand. SUMIF is the first step from "a spreadsheet that adds" to "a spreadsheet that answers questions".
How do I fetch a value from another table? VLOOKUP and XLOOKUP
The last first-week formula is the lookup: given a label, find its row and return a value from another column. A second small table, in G1:H6, lists each product and its supplier:
| G — Product | H — Supplier | |
|---|---|---|
| 2 | Tea | Northern Tea Co |
| 3 | Coffee | Highland Beans |
| 4 | Sugar | City Sugar Mills |
| 5 | Biscuits | Golden Bake |
| 6 | Milk | Valley Dairy |
In F2, to find Coffee's total from the main table:
=VLOOKUP("Coffee",A2:D6,4,FALSE)What to find ("Coffee"), where to look (A2:D6), which column to return (4 — the Total column), and FALSE for exact match only. The answer is 7500.
FALSE matters: without it, VLOOKUP returns the nearest match below your value, which is almost never what a beginner wants. Always write FALSE (or 0, which means the same thing).
If your version of Excel offers XLOOKUP, it is the simpler modern replacement:
=XLOOKUP("Coffee",A2:A6,D2:D6)No column number, no FALSE — same answer, 7500. Use XLOOKUP where it is available; use VLOOKUP for older Excel versions or existing files.
What does the finished sheet look like, and how do you check it?
Your summary block (rows 8–11) should read:
| Label | Value |
|---|---|
| Total sales (D8) | 36700 |
| Average units (B9) | 42 |
| Products listed (B10) | 5 |
| Products over 40 units (B11) | 2 |
| Tea sales only (D9) | 6000 |
Check it two ways. First, change one input: set Tea's units (B2) to 50. D2 becomes 7500, D8 becomes 38200, B9 becomes 44, and Tea's label in E2 flips to "Strong". Undo (Ctrl+Z) and everything returns — proof your cells are formulas, not typed-in numbers. Second, click any result cell and read the formula bar: it should show the formula while the cell shows the answer. If the cell shows the formula text itself, you forgot the leading = or the cell is formatted as Text.
Try it yourself
Add a sixth product — Juice, 45 units at 220 — extend every range to row 7, and check the answers: total 46600, average units 42.5, products over 40 units now 3. Then write a SUMIF that totals only the products labelled "Strong" in column E. When it works, test yourself in the Module Quiz: Analysis Formulas on the Spreadsheets for Data Analysis course page (/course/spreadsheets-for-data-analysis).
Continue in the free course: Spreadsheets for Data Analysis →
Common mistakes
- Forgetting the
=at the start. Without it,SUM(D2:D6)is just text in a cell — Excel will not calculate anything, and there is no error message to warn you. - Typing numbers instead of references.
=40*150gives the right answer once and the wrong answer forever after — change the units and the total stays frozen. Always point at cells (=B2*C2), never type the numbers in. - Numbers stored as text. If a formula returns 0 or ignores a cell, the "number" is probably text — often after pasting from a website. Select the cells, use Data → Text to Columns (or retype the values), and the formulas start working.
- The
>7000boundary.IF(D2>7000,...)excludes exactly 7000. Decide whether the boundary belongs in or out, and use>=when it belongs in. - Leaving out
FALSEin VLOOKUP. Without it,VLOOKUPreturns an approximate match and silently gives you the wrong row's value. Exact match (FALSE) is the safe default for beginners. - Ranges that miss the new row. Add a product at the bottom and
=SUM(D2:D6)still stops at row 6 — extend the range, or format the data as an Excel Table (Insert → Table), which grows automatically.
Frequently asked questions
What is the difference between a formula and a function?
A formula is the whole expression in a cell, starting with = — for example =B2*C2. A function is a named operation used inside a formula, like SUM or IF.
Do these formulas work in Google Sheets too?
Yes — SUM, AVERAGE, COUNT, COUNTIF, IF, SUMIF and VLOOKUP all work identically in Google Sheets, and XLOOKUP is supported there as well. The only differences are menu names and a few advanced functions, none of which this tutorial uses.
Why does my formula show #VALUE! or #N/A?
#VALUE! usually means a formula is trying to calculate with text — a number stored as text, or a stray space in a cell. #N/A from VLOOKUP means the lookup value was not found: check the spelling, since extra spaces are the usual cause.
When should I use a pivot table instead of these formulas?
When the question needs grouping — totals *by* product, *by* month, *by* region — a pivot table does in seconds what would take a dozen SUMIF formulas. That is the next tutorial in this series: Pivot Tables, step by step on a messy sales sheet.
Can I combine these formulas?
Yes, and that is the point. =IF(SUM(D2:D6)>30000,"Target met","Below target") wraps a SUM inside an IF. Learn each one on its own first, then combine two — a formula with three nested functions is where beginners start making errors they cannot find. ---
Follow the Data Analyst Roadmap
Turn raw data into decisions with spreadsheets, SQL, Python and dashboards. Free, step by step, at your pace.
View the Roadmap