The Analyst's Path

F4 key in Excel

The F4 key adds and removes the dollar signs on a cell reference as you edit a formula, cycling it through four states in a fixed order. Nobody memorises which dollar signs to type. Pressed on a worksheet with a completed action behind it, F4 means "repeat last action", the same as Ctrl+Y. Excel reads the context to work out which you meant.

3 min readPart of Formulas I: References, Names & LogicOpen in course mode

Advertisement

You don't type dollar signs by hand. You could, but the fast way, the one that becomes muscle memory within a week, is the F4 key. With the text cursor touching or immediately beside a reference in the formula bar, or in a cell in edit mode, each press of F4 cycles that reference through the four states in a fixed order:

A1   →   $A$1   →   A$1   →   $A1   →   (back to) A1
plain    both     row      column     plain
         locked   locked   locked

So type =B2*F1, and while the cursor is still on the F1 you just typed, tap F4 once. It becomes $F$1, fully absolute, which is the most common thing you want. Tap again for F$1, row locked, for a fill-down under a header. Tap again for $F1, column locked, for a fill-right past a label, and once more to return to plain F1. Nobody memorises which dollar signs to type. You tap F4 until the reference looks the way you need, and for the everyday commission-rate case that's one tap. On a Mac without a dedicated F4, the equivalent is ⌘+T. Some laptop keyboards require Fn+F4 if the function-key row defaults to media controls.

Two refinements are worth learning now. First, F4 acts on the reference the cursor is inside. To lock several references in a formula, click into each one in turn and tap F4, because there is no "lock everything" key. Second, you can select a whole reference, or several, by dragging in the formula bar, and press F4 to toggle them together. That's the fast way to fix a formula that was built without locks: F2 to edit it, select the offending reference, F4 to the state you need, Enter. This F2 → F4 → Enter repair is one of the most-used three-key sequences in professional modelling, and you'll practise it in the module.

Advertisement

What does F4 do outside a formula?

One caution will save you grief later. When you are not editing a formula, F4 has a second, unrelated job. Pressed on a worksheet with a completed action behind it, F4 means "repeat last action", the same as Ctrl+Y. That's a useful key for, say, applying the same fill colour to ten separate ranges. Just know that the "cycle the reference" behaviour only happens while a reference is live in an editing context. Otherwise you get the "repeat" behaviour. Excel reads the context to work out which you meant.

Advertisement

Part of the course

This page is part of Formulas I: References, Names & Logic (EX0.02), in Phase 0: Orientation and foundations. The module's flashcards and its quiz are in the app.