من أنا
المقالات
الوظائف
التواصل معي

Formulas and references

The = sign turns a cell from a sheet of paper into a calculator. And the difference between B2 and $B$2 is the difference between a file that works and one that collapses the moment you fill it down.

Chapter 1 · Lesson 2 of 510 min readBeginner level

Every formula starts with = and is built from references, numbers, operators and functions. The golden rule: never type a number inside a formula if it could change — put it in a cell and point at it.

1 Anatomy of a formula

fx =ROUND(B2*$F$1, 2)
  • = declares that what follows is a calculation, not text.
  • ROUND is a function name, with its arguments inside the brackets, separated by a comma.
  • B2 is a relative reference that moves as you fill down.
  • $F$1 is an absolute reference, pinned in place.
  • 2 is a constant — the number of decimal places.

Comma or semicolon?

Excel separates function arguments with a comma , or a semicolon ; depending on your system’s language settings. If Excel rejects a formula that looks perfectly correct, try switching the separator.

2 The three kinds of reference

KindFormBehaviour when filledWhen to use it
RelativeB2Moves horizontally and verticallyA calculation done per row
Absolute$B$2Never movesA rate or fixed price held in one cell
Mixed$B2 or B$2Pins only the column or only the rowMultiplication tables and matrices

Press F4 while editing a formula to cycle through the four forms without typing dollar signs by hand.

What actually happens when you fill a formula down?

Without $ — the reference slides
Amount Formula Result
2 10,000 =B2*F1 1,500
3 4,000 =B3*F2 0
4 25,500 =B4*F3 0
With $ — the reference holds
Amount Formula Result
2 10,000 =B2*$F$1 1,500
3 4,000 =B3*$F$1 600
4 25,500 =B4*$F$1 3,825
1The original formula in row 2 works in both cases
2Fill down one row: F1 has become F2 in the table without dollars
3And one more: F3 — both are empty cells, so the result is zero
4Whereas $F$1 stayed exactly as it was in every row

The zeros in the table without dollars raise no error message at all — which is why this mistake slips into reports so easily. Press F4 after typing a reference and Excel adds the dollars for you.

Calculating tax from a rate held in one cell

The tax rate sits in F1, and the amounts are in column B:

The formula in C2 is =B2*$F$1, then filled down
ABCF
1InvoiceAmountTax15%
2INV-00110,0001,500
3INV-0024,000600
4INV-00325,5003,825

If you wrote =B2*F1 with no dollars: filling down to C3 makes it =B3*F2 — and F2 is an empty cell, so zeros appear. This is the single most common error in Excel.

And why not write =B2*0.15? Because the day the rate changes, you have to edit every formula in the file. With a cell, you edit it once.

3 Order of operations

1
( )

Brackets first

2
^

Exponent

3
* ÷

Multiplication and division

4
+ −

Addition and subtraction

5
&

Joining text

6
= < >

Comparison last

‎=2+3*4‎ equals 14, not 20 — and brackets settle what you meant

4 Error messages and what they mean

ErrorWhat it meansThe fix
#DIV/0!Division by zero or by an empty cellWrap it in IFERROR, or check the denominator
#VALUE!The wrong data type (text in an arithmetic operation)Convert the text to a number
#REF!A deleted reference — you removed a row or column the formula pointed toUndo immediately with Ctrl+Z and rebuild the reference
#N/AThe value was not found in the lookup rangeCheck spaces and formatting, or use IFNA
#NAME?A misspelt function or range nameCorrect the name or define the range
#####Not an error — the column is narrower than the numberWiden the column
Common errors as they appear in the sheet
ABC
1Average#DIV/0!Dividing by a count of zero
2Total#VALUE!“SAR 1,200” is text, not a number
3Item price#N/AThe code is not in the price table

Do not hide an error before you understand it

IFERROR hides every error, including the real ones. Use it after you have established the cause, not before, and prefer IFNA when “not found” is the only thing you expect.

Lesson summary

  • Every formula starts with = and is read in the formula bar.
  • Put changeable constants in cells and point at them with an absolute reference.
  • F4 cycles between relative, absolute and mixed.
  • Brackets come before multiplication, and multiplication before addition.
  • #REF! means you deleted something the formula depended on — undo at once.

5 Test your understanding

Three quick questions

Pick the answer you believe is correct and you will see the result immediately.

1. The commission rate is in cell H1 and will be used for every row. The correct formula in C2 is:

2. ‎=10+2*5‎ equals:

3. #REF! appeared across a whole column after you deleted another column. What do you do?

Sources and review: the rules for formulas and references and the names of the error messages follow the official documentation for Microsoft Excel. The argument separator and the appearance of some messages change with your machine’s language and regional settings. The figures in the examples are illustrative. Last reviewed: September 2026.