Skip to content
6 min fix Updated 8 Aug 2026Beginner
Quick Answer

Every Excel formula starts with =. Click an empty cell, type =SUM(B2:B10), and press Enter to total cells B2 through B10 — or click AutoSum on the Home tab and Excel writes the formula for you.

How to Write Your First Excel Formula

Applies to: Microsoft 365 (Excel for Windows, Excel for Mac, Excel for the web); Excel 2016, 2019, 2021
Article Type: How-To
Last Updated: 2026-08-08

Summary

Every formula in Excel — from a lunch-budget total to a company forecast — is built from the same pieces: an equals sign, cell references, and a function over a range. This article walks you through each piece, totals a column with SUM and the AutoSum button, and shows you how to copy a formula down a column. No Excel experience assumed.

Before You Start

  • None required. Every step works in every version of Excel, including Excel for the web, and needs nothing beyond a workbook you can edit.

Instructions

The examples use a small expense sheet: item names in column A and amounts in column B, filling rows 2 through 10. Any numbers of your own work the same way.

1. Type Your First Formula

Every formula starts with an equals sign — that is what tells Excel to calculate what follows instead of storing it as text.

  1. Click any empty cell. A border highlights it, and its reference — column letter plus row number, such as D2 — appears in the Name Box at the left end of the formula bar, the long white box above the column letters.
  2. Type =2+3 and press Enter. The cell shows 5.
  3. Click the cell again and look at the formula bar: it reads =2+3. The cell shows the answer; the formula bar shows the recipe. That split is how you read every formula from now on.

Type 2+3 without the equals sign and Excel stores it as three characters of text. The = is the switch that turns a cell into a calculator. The arithmetic operators all sit on your keyboard:

  • + adds and - subtracts.
  • * — the asterisk — multiplies. Excel does not use the letter x.
  • / — the forward slash — divides.

2. Build a Formula by Clicking Cells

Pointing at cells instead of typing their values is what makes a formula worth writing — the answer updates itself whenever the numbers change.

With 250 in B2 and 175 in B3:

  1. Click an empty cell and type =.
  2. Click cell B2. A colored border surrounds it, and B2 appears in your formula — Excel writes the reference for you.
  3. Type +, then click cell B3. The formula now reads =B2+B3.
  4. Press Enter. The cell shows 425.
  5. Change the number in B2 to 300 and press Enter. The formula's cell updates to 475 on its own. That is the point of references: the formula remembers where the numbers live, not what they were.

3. Total a Column with SUM

SUM adds every number in a range, so one short formula totals a column that would take a dozen clicks to add cell by cell.

  1. Click the empty cell directly below the numbers — B11 when the amounts fill B2 through B10.
  2. Type =SUM(B2:B10) and press Enter. The cell shows the total of all nine amounts.

The colon means "through": B2:B10 is every cell from B2 down to B10, and a block of cells like that is called a range. You can also let the mouse write the range: type =SUM(, drag from B2 to B10, type ), and press Enter.

Verification: Click the total cell. The formula bar reads =SUM(B2:B10), and changing any amount in the column updates the total the moment you press Enter.

4. Let AutoSum Write It for You

The AutoSum button builds the SUM formula and picks the range itself.

  1. Click the empty cell directly below your column of numbers.
  2. On the Home tab, in the Editing group at the right-hand end of the ribbon, click AutoSum — the button marked Σ. Excel writes =SUM(B2:B10) in the cell and surrounds the range it picked with a moving dashed border.
  3. Check that the dashed border covers the numbers you meant. If it stopped short — a blank cell interrupts its guess — drag across the correct cells to replace the range.
  4. Press Enter. The total appears.

The keyboard route is Alt + = on Windows, or Cmd + Shift + T on a Mac — same button, no mouse.

5. Ask for the Average or the Count

AVERAGE and COUNT have exactly the same shape as SUM — same equals sign, same range, different question.

  1. Click an empty cell, type =AVERAGE(B2:B10), and press Enter. The cell shows the average of the nine amounts.
  2. In another empty cell, type =COUNT(B2:B10) and press Enter. The cell shows how many cells in the range hold numbers — a quick check that no amount came in as text.
  3. For the no-typing route, click the arrow beside AutoSum on the Home tab and choose Average or Count Numbers. Excel builds the formula the same way it builds SUM.

6. Copy a Formula Down a Column with the Fill Handle

Write a formula once and the fill handle copies it down the column, re-aiming it at each row as it goes.

Say column A holds quantities, column B holds unit prices, and each row's cost belongs in column C:

  1. Click C2, type =A2*B2, and press Enter. Row 2's cost appears.
  2. Click C2 again and point at the small square in its bottom-right corner — the fill handle. The pointer changes to a thin black cross.
  3. Double-click the fill handle. The formula copies down as far as the data beside it. Dragging the handle down does the same when you want to pick the stopping row yourself.
  4. Click C5 and read the formula bar: it says =A5*B5, not =A2*B2. Each copy shifted its references to its own row.

That shifting is called a relative reference — a copied formula points at cells by position, not by fixed address. It is exactly what you want here, and when you need a reference that stays put, a $ sign locks it — Understanding Absolute and Relative Cell References in Excel explains when to reach for one.

And that is the whole foundation: = starts a formula, references point at your data, functions like SUM answer questions about a range, and the fill handle scales one good formula to a thousand rows. Everything else Excel does with formulas is a variation on what you built on this page.

Troubleshooting

TIP

To see the formula behind any result, click the cell and read the formula bar. To see every formula on the sheet at once, press Ctrl + ` — the key above Tab — and press the same keys again to switch back to the results.

Symptom / ErrorPotential CauseSolution
The cell shows the formula text instead of an answerThe = is missing, or the cell was formatted as Text before you typedStart the formula with =. If it still shows as text, open the format dropdown in the Number group of the Home tab, choose General, then double-click the cell and press Enter.
##### fills the cellThe column is too narrow to show the numberDouble-click the boundary line to the right of the column's letter — the column widens to fit. Nothing about the number is wrong.
#NAME?The function name is mistypedCheck the spelling: =SUM(B2:B10), not =SUMM(B2:B10).
#VALUE!A referenced cell holds text, not a numberPoint the formula at cells that hold numbers, or fix the text cell — an amount typed as 45 dollars counts as text.
AutoSum picked the wrong rangeA blank cell interrupted the columnWhile the dashed border is showing, drag across the correct cells, then press Enter — or edit the range between the parentheses in the formula bar.
A circular reference warning appearsThe formula includes its own cellKeep the formula out of the range it measures: a total for B2:B10 belongs in B11, and its range stops at B10.