What Happens When You Press F4 in Excel
Explore the exact behavior of the F4 key in Excel, including formula reference toggling, repeating actions, platform differences (Windows vs Mac), and practical workflows to boost speed and accuracy.

Pressing F4 in Excel toggles the active formula’s references between relative and absolute, cycling through A1, $A$1, $A1, A$1, and back to A1. On Mac, you may need to press Fn+F4 depending on your keyboard settings. According to XLS Library, mastering F4 speeds up formula editing and reduces copy-paste errors.
What F4 does in Excel: quick overview
When you press F4 in Excel while editing a formula, the key acts as a fast reference anchor tool. The most common use is to cycle the selected cell reference through different reference types: from a relative reference like A1 to an absolute reference like $A$1, then to mixed references such as $A1 or A$1, and back to the original relative form. This behavior is essential when you plan to fill formulas across rows or columns and need precise control over which parts of a reference shift. In this section we’ll cover the standard cycle, how it behaves in named ranges, and why this matters for data integrity.
=SUM(A1:A3)Initially, the formula uses relative references. After pressing F4, the formula may become:
=SUM($A$1:$A$3)Continuing presses cycle through:
=SUM($A1:$A3)
=SUM(A$1:A$3)
=SUM(A1:A3)Each state controls how copying the formula will adjust the reference when filled across cells. This is crucial for scenarios like comparing two columns with fixed anchors. According to XLS Library, this cycle reduces manual editing and minimizes reference errors during large-scale data tasks.
context':'Introductory note on the general behavior of F4 in formulas.
link»:null
Steps
Estimated time: 15-25 minutes
- 1
Open a workbook and edit a formula
Open a workbook, select a cell containing a formula like =SUM(A1:A3), and enter edit mode by pressing F2 or clicking the formula bar. This prepares the reference for cycling.
Tip: Use the formula bar to keep your editing focused and avoid accidental edits elsewhere. - 2
Cycle to absolute references
With the caret on the reference A1 in the formula, press F4 once to switch to $A$1. This locks both the column and row. If you’re editing a range, the entire range updates similarly.
Tip: Observe how the highlighted references stay fixed when filled across cells. - 3
Cycle through mixed references
Keep pressing F4 to cycle through mixed forms like $A1 and A$1. These are useful when you want only the column or the row to lock. Adjust the rest of the formula accordingly.
Tip: Mixing references helps preserve required anchors while allowing other parts to change. - 4
Return to relative reference
Continue pressing F4 until you return to a fully relative reference (A1:A3). This is often the starting state after you’ve set anchors for a specific copy pattern.
Tip: If you overshoot, re-enter the reference and start the cycle again. - 5
Test with fill down/up
Copy or fill the formula across rows or columns to verify that references adjust as intended when mixed or absolute anchors are applied.
Tip: Validate by comparing results against a known baseline to ensure accuracy.
Prerequisites
Required
- Required
- Keyboard with a dedicated F4 key (or Fn+F4 on Macs)Required
- Basic formula editing knowledge (navigating formulas in a worksheet)Required
Optional
- Familiarity with absolute vs relative references (A1 vs $A$1)Optional
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Cycle formula reference types (A1 → $A$1 → $A1 → A$1 → back to A1)Edit mode: place cursor on a cell reference inside a formula | F4 |
| Repeat last action in Excel (e.g., apply formatting)After performing an action, press F4 to repeat on the next target | F4 |
People Also Ask
What does pressing F4 do in Excel?
F4 toggles the selected cell reference inside a formula between relative and absolute forms. The cycle typically goes A1 → $A$1 → $A1 → A$1 → back to A1. It saves time when copying formulas across large ranges.
F4 changes how a cell reference behaves when you copy a formula, cycling through different lock states.
How many reference modes does F4 cycle through?
F4 cycles through four reference states: relative (A1), absolute column and row ($A$1), absolute column mixed row ($A1), and absolute row mixed column (A$1), then back to relative.
It cycles through four reference types in order.
Can I customize or disable F4 behavior?
Excel does not provide a direct in-app toggle to remap F4 for the common reference-cycling action, but you can customize function-key behavior at the OS level or use an add-in or macro to emulate similar shortcuts.
There isn’t a built-in way to remap F4 in Excel, but you can alter function-key behavior at the OS level.
Does F4 work in Excel Online or mobile apps?
F4 support varies by platform. In Excel Online and some mobile apps, the key may behave differently or require an on-screen modifier. If F4 doesn’t cycle references, you may need alternative steps or a browser/macOS keyboard setting adjustment.
On web and mobile, F4 behavior can differ; check the app’s shortcuts or use alternatives.
What about F4 with array formulas or structured references?
In array formulas and with structured references, F4’s behavior can be context-sensitive. The cycle may affect the selection differently, and in some cases, it may lock parts of a reference within an array. Always verify the result after editing.
In advanced contexts, test to confirm how the reference toggling behaves.
The Essentials
- Master F4 to toggle formula references quickly
- Know the cycle: A1 → $A$1 → $A1 → A$1 → A1
- On Mac, use Fn+F4 if needed to access the same behavior
- F4 can also repeat the last action for speed
- Test changes in a small sample before applying broadly