Learn › Excel › Lock a cell reference ($)

Excel F4 shortcut: F4

Lock a cell in a formula with dollar signs, so it does not move when you copy.

← All Excel shortcuts

With voice. Recorded in Excel for the web; the shortcut works the same in desktop Excel. Recorded on a US keyboard. On other keyboards some keys differ: see the table below the video.

WindowsF4
Mac⌘+T

Keys on keyboards of other languages

The video is recorded on an English (US) keyboard. This is how the same shortcut is pressed on the keyboards of the other languages. The highlighted row is your language.

Laptops with an Fn key: the F keys (F2, F4, F5, F11...) usually need Fn pressed together with them, for example Fn + F4. If Fn Lock is on, they work without Fn.

English (US)F4 · on laptops with Fn: Fn+F4
HrvatskiF4 · on laptops with Fn: Fn+F4
DeutschF4 · on laptops with Fn: Fn+F4
EspañolF4 · on laptops with Fn: Fn+F4
FrançaisF4 · on laptops with Fn: Fn+F4
PortuguêsF4 · on laptops with Fn: Fn+F4
ItalianoF4 · on laptops with Fn: Fn+F4
TürkçeF4 · on laptops with Fn: Fn+F4
Bahasa IndonesiaF4 · on laptops with Fn: Fn+F4
PolskiF4 · on laptops with Fn: Fn+F4

What it does

While you edit a formula, F4 adds dollar signs to the cell reference next to the cursor, turning E1 into $E$1. A reference with dollar signs is absolute: it stays on the same cell when you copy the formula. Press F4 again for E$1, then $E1, then back to E1.

When to use it

Use it when one cell, such as a tax rate or an exchange rate, must be used by many formulas. Lock that cell with F4, then copy or fill the formula down, and every row uses the same rate.

How to do it

  1. Type the formula, for example =B2*E1.
  2. With the cursor right behind E1, press F4. It becomes $E$1.
  3. Press Enter, then copy the formula down. The locked cell stays the same.
Good to know: F4 only works while you are typing or editing the formula, with the cursor on or right behind the reference. On many laptops F4 is a media key, so hold Fn as well.

A quick example

Prices are in B2 to B5 and the tax rate, 0.2, is in E1. In C2 type =B2*E1 and press F4 right after E1, so it reads =B2*$E$1. Press Enter and copy the formula down: every row multiplies by the same rate in E1.

F4, the dollar sign and mixed references

You can type the dollar signs by hand, but F4 is faster. Each press cycles through four versions: $E$1 locks the row and the column, E$1 locks only the row, $E1 locks only the column, and E1 locks nothing. On a Mac use Command + T, or Fn + F4 if your function keys are set to standard.

Shortcuts mentioned on this page, with video:

Edit a cellF2

Not working? Check this

  • Nothing happens: you are not in edit mode. Press F2 first, put the cursor on the reference, then press F4.
  • On a laptop F4 may be a media key: hold Fn and press F4.
  • On a Mac use Command + T.
  • F4 repeats your last action instead: when you are not editing a formula, F4 repeats the last thing you did, so check that the cell is in edit mode.

Quick answers

What does F4 do in an Excel formula?

It adds or changes dollar signs on the reference next to the cursor. Press F4 once for $E$1, again for E$1, again for $E1, and once more for E1.

What is the shortcut for the dollar sign in Excel?

Press F4 while you edit the formula (Command + T on a Mac). You can also type the dollar signs yourself.

Why does F4 not lock my cell?

You must be editing the formula, with the cursor on the reference. Press F2, click into the reference in the formula, then press F4. On laptops hold Fn.

← All Excel shortcuts

Chrome extensions

Free web tools

Free games