ExcelyourTraining

Home › Blog

Absolute reference in Excel: how the dollar sign locks a cell (with a rand VAT example)

You have a list of prices and one VAT rate. You write a formula for the first row, copy it down, and the answers below turn into zeros or errors. The fix is two small dollar signs.

By the end of this post you will know what an absolute reference in Excel is, how to add one with a single key, and when to lock only part of a reference. We will use a short price list in rand with VAT at 15%.

Why formulas move when you copy them

Excel normally treats cell references as relative. A formula in C4 that says =B4*B1 doesn't really mean "cell B4 times cell B1". It means "the cell one column to my left, times the cell three rows up and one column to my left".

That is useful most of the time. When you copy =B4*2 down a column, each row should use its own price, so B4 becomes B5, then B6, and so on.

The trouble starts when one of the cells should stay put. A VAT rate, an exchange rate or a commission percentage sits in one cell, and every row needs to point at that same cell.

The problem in action

Thandi runs a small homeware shop in Durban. Her sheet looks like this:

A B C
1 VAT rate 15%
2
3 Item Price excl. VAT VAT
4 Lamp R1 250
5 Cushion R480
6 Rug R2 300
7 Candle R95

In C4 she types =B4*B1 and presses Enter. The answer is R187.50. Correct.

Then she copies C4 down to C7. Here is what Excel puts in each cell:

Cell Formula after copying Result
C4 =B4*B1 R187.50
C5 =B5*B2 R0.00
C6 =B6*B3 #VALUE!
C7 =B7*B4 R118 750.00

The price reference moved down one row each time, which is what she wanted. The VAT reference moved too. B2 is empty, so C5 shows zero. B3 holds the heading text, so C6 shows an error. And C7 multiplies the candle by the lamp's price, which gives a huge, wrong number with no warning at all.

That last row is the dangerous one. An error is easy to spot. A wrong number that looks like a real number is not.

How to lock a cell in a formula with $

A dollar sign in an Excel formula tells Excel "don't change this part when the formula is copied". It has nothing to do with currency. You can work in rand all day and still need it.

A cell address has two parts: the column letter and the row number. You can lock either one, or both:

Reference What stays fixed Type
B1 Nothing Relative
$B$1 Column and row Absolute
B$1 Row only Mixed
$B1 Column only Mixed

For Thandi's VAT rate, both parts must stay fixed, so she wants $B$1. Her formula in C4 becomes:

=B4*$B$1

Now when she copies it down, only the price reference moves:

Cell Formula after copying Result
C4 =B4*$B$1 R187.50
C5 =B5*$B$1 R72.00
C6 =B6*$B$1 R345.00
C7 =B7*$B$1 R14.25

Every row now uses its own price and the same 15%. If the rate ever changes, Thandi updates B1 once and the whole column recalculates.

The quick way: F4 on Windows, Cmd+T on Mac

You can type the dollar signs yourself, but there is a faster way.

  1. Start typing your formula, or click into an existing one in the formula bar.
  2. Put the cursor on (or just after) the reference you want to lock, for example B1.
  3. Press F4 (Windows) or Cmd+T (Mac).

Each press cycles through the four types in this order: $B$1, then B$1, then $B1, then back to B1. Stop when you see the one you need.

On many laptops the top-row keys control volume or brightness by default. If F4 changes your screen instead of your formula, press Fn+F4. On a Mac, Fn+F4 also works on many keyboards, but Cmd+T is the shortcut that works without changing any settings.

A quick look at mixed references

Most of the time you will want $B$1. Mixed references are worth knowing about for one common case: a grid where each row and each column has its own input.

Pieter in Johannesburg wants to see each price at three different discount rates:

A B C D
1 Price 5% 10% 15%
2 R1 250
3 R480
4 R2 300

In B2 he types =$A2*B$1.

He copies B2 across to D2, then copies the whole row down to row 4. One formula fills all nine cells correctly. If he had used $A$2*$B$1 instead, every cell would show the same answer.

Add the total with VAT

Once your VAT column works, the total is one more formula. In D4 you could add the price and the VAT:

=B4+C4

Or skip the VAT column and work out the total in one step:

=B4*(1+$B$1)

For the lamp, that gives R1 437.50. Notice the dollar signs again: 1 plus the locked VAT rate, times the price in this row.

To copy either formula down quickly, select the cell with the formula and the empty cells below it, then press Ctrl+D (Windows) or Cmd+D (Mac). That is fill down, and it copies the top cell into every selected cell underneath.

A simple habit that catches mistakes

After you copy any formula, click on a cell near the bottom of the column and read the formula in the formula bar. Ask yourself one question: does every reference still point where it should?

If the price reference has moved to the right row and the rate still says $B$1, you are done. This check takes a few seconds and catches the silent errors, like Thandi's R118 750 candle, before anyone else sees them.

Try it yourself

Reading about the dollar sign helps. Seeing your own formula break and then fixing it is what makes it stick.

Lesson 4: Locking a cell with $ lets you copy a formula without the $, watch it go wrong, then lock the cell and try again. It runs in your browser, checks your answer the moment you press Enter, and it's free with no sign-up.

New to formulas? Start with lesson 2, your first formula, then practise copying formulas in lesson 3, fill down.

Excel is a trademark of Microsoft. ExcelyourTraining is not affiliated with Microsoft.