What F4 does while you edit
When you are editing a formula, F4 changes the reference nearest the cursor. Each press moves it to the next form: relative, absolute, row-locked or column-locked. It is a shortcut for typing the dollar signs by hand.
The order of presses
Starting from a relative reference such as A1, the presses cycle like this:
$A$1: column and row both lockedA$1: row locked, column can change$A1: column locked, row can changeA1: back to relative
After the fourth press, the cycle starts again.
How to use it
- Double-click the cell, or click in the formula bar, to start editing.
- Place the cursor inside the reference, or right after it.
- Press F4 and read the formula. Keep pressing until it shows the form you need.
If you select a whole range such as B2:B10 while editing, F4 changes both ends together, giving $B$2:$B$10.
F4 outside of editing
When you are not editing a formula, F4 repeats your last action instead, such as repeating a formatting change. The same key does two jobs, so check that you are in edit mode before you expect it to change a reference.
Why F4 seems to do nothing
- You are not in edit mode. F4 repeats the last action instead.
- The cursor is not on a reference. Click inside the reference itself, or right after it.
- Your laptop uses the key for something else. Some laptops need you to hold Fn while pressing F4. You can also check the keyboard settings to see whether the function keys act as media controls by default.
On a Mac
In recent versions of Excel for Mac, Command+T toggles references in the same way. If that doesn’t work on your version, check Excel’s keyboard shortcut list.
Check the result
After you toggle a reference, copy the formula into a neighboring cell and check the new result. If you would rather type the dollar signs yourself, how to lock cell reference in excel shows where each sign goes. The bigger picture, including how references move when copied, is in excel cell references explained.