Cell References

What F4 Does in an Excel Formula

F4 cycles a cell reference through relative and absolute forms while you edit a formula. See the press order, and how to use it on a Mac.

On this page
  1. What F4 does while you edit
  2. The order of presses
  3. How to use it
  4. F4 outside of editing
  5. Why F4 seems to do nothing
  6. On a Mac
  7. Check the result

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:

  1. $A$1: column and row both locked
  2. A$1: row locked, column can change
  3. $A1: column locked, row can change
  4. A1: back to relative

After the fourth press, the cycle starts again.

How to use it

  1. Double-click the cell, or click in the formula bar, to start editing.
  2. Place the cursor inside the reference, or right after it.
  3. 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.

The complete guide to cell references

Cell References in Excel Explained
Read the guide

Keep exploring

Guides from other topics

All topics →