ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Basics
  3. What F4 Does in Excel (Windows and Mac)

What F4 Does in Excel (Windows and Mac)

By ExcelReady Team·Updated November 1, 2026·5 min read

The short answer

F4 in Excel has two jobs. While you edit a formula, it cycles the reference at the cursor through A1, $A$1, A$1 and $A1, adding or removing $ signs. When you are not editing, it repeats your last action on Windows, such as inserting a row. On a Mac, use fn+F4 or ⌘T for references and ⌘Y to repeat.

Key takeaways

  • While editing a formula, F4 cycles a reference: A1, $A$1, A$1, $A1, then back to A1.
  • When not editing, F4 repeats the last action on Windows, the same as Ctrl+Y.
  • On a Mac, fn+F4 or ⌘T toggles references and ⌘Y repeats the last action.
  • On many laptops, F4 controls the screen or sound unless you hold Fn or turn on Fn Lock.
  • Careful: Alt+F4 closes Excel and Ctrl+F4 closes the workbook window.
On this page+
  1. What does F4 do in Excel?
  2. How F4 adds $ signs to references
  3. How to change every reference at once
  4. How F4 repeats your last action
  5. Why is F4 not working?
  6. F4 in a job test
  7. Other F4 shortcuts to know
  8. Practise it

F4 in Excel does two useful things, depending on what you are doing. While you edit a formula, it adds $ signs to a cell reference so the reference stays fixed when you copy. When you are not editing, it repeats your last action on Windows. This guide covers both jobs, the Mac equivalents, and why F4 sometimes seems to do nothing on a laptop.

What does F4 do in Excel?#

F4 behaves differently depending on whether a cell is in edit mode:

SituationWhat F4 doesMac equivalent
Editing a formula, cursor on a referenceCycles the reference through four typesfn+F4 or ⌘T
Not editing (a cell is just selected)Repeats the last action (Windows)⌘Y

Edit mode means you can see a blinking cursor inside the cell or the formula bar, after typing =, pressing F2 or double-clicking a cell.

How F4 adds $ signs to references#

While you edit a formula, put the cursor in or next to a reference and press F4. Each press moves to the next type:

PressReferenceWhat is locked
0E1Nothing (relative)
1$E$1Column and row (absolute)
2E$1Row only (mixed)
3$E1Column only (mixed)
4E1Back to relative

Here is the classic use. Prices are in B2:B4 and one tax rate of 20% is in E1. In C2, type =B2*E1. Before you press Enter, click on E1 in the formula and press F4 once:

Excel formula
=B2*$E$1

Press Enter and the result is 10 (50 × 0.2). Fill the formula down with Ctrl+D (⌘D on a Mac), and C3 becomes =B3*$E$1 (7) and C4 becomes =B4*$E$1 (16). B2 moved, but E1 stayed fixed. Without the $ signs, C3 would point to E2, which is empty, and return 0.

To see why this matters, read the guide to Excel cell references. The two-press and three-press forms are mixed references, which lock only the row or only the column; see how to copy a formula without changing references for related tricks.

How to change every reference at once#

F4 changes only the reference at the cursor. To change several at once, select them in the formula bar first.

  1. Click the cell, then click in the formula bar.
  2. Select the whole formula text, or just the part with the references you want to change.
  3. Press F4. Every reference in the selection moves to the next type together.

This is handy for a formula like =SUMIF(A2:A20,G2,C2:C20) when you want to lock both ranges before filling down. Select the text from A2 to C20, press F4, then remove the $ signs from G2 if it should stay relative.

How F4 repeats your last action#

When you are not editing a cell, F4 repeats the last thing you did. It works for many formatting and editing actions:

  • Insert a row: insert one row, then click elsewhere and press F4 to insert another.
  • Delete a column: delete one, select the next and press F4.
  • Apply formatting: fill one cell yellow, then select another cell and press F4.

On Windows, Ctrl+Y does the same thing when there is nothing to redo. On a Mac, use ⌘Y. Not every action can be repeated. If F4 does nothing, use the ribbon or the action's own shortcut again. The guide to editing cells, undo and redo explains how repeat fits with undo and redo, and how to insert and delete rows and columns has the shortcuts that pair well with F4.

Why is F4 not working?#

If F4 does nothing, or changes your screen brightness, one of these is usually the cause:

  • Laptop function keys. Many laptops use the top row for brightness, volume or other features. Hold Fn and press F4, or turn on Fn Lock (often Fn+Esc, but it varies by brand).
  • Mac function keys. Hold fn, use ⌘T, or tick "Use F1, F2, etc. keys as standard function keys" in macOS keyboard settings.
  • Not in edit mode. F4 only toggles references while you are editing. Press F2 first, or click in the formula bar.
  • Cursor not on a reference. If the cursor is on a function name or a number, F4 has nothing to change.
  • Nothing to repeat. Outside edit mode, F4 needs a repeatable last action.

F4 in a job test#

Excel tests often include a task that only works if one cell is locked, such as a commission rate, an exchange rate or a tax rate in a single cell. The fastest route is to type the formula, press F4 on the fixed reference, and fill down. Then click the last cell in the column and read its formula. If the fixed reference still points to the rate cell, you got it right. That one check catches the most common reference mistake before you hand in your answers.

Other F4 shortcuts to know#

F4 combines with other keys, and two of them close things:

Shortcut (Windows)What it does
Alt+F4Closes Excel (it asks to save first)
Ctrl+F4Closes the current workbook window
Shift+F4Repeats the last Find, like Find Next

Shift+F4 is useful after you search for a word with Ctrl+F: close the dialog and press Shift+F4 to jump to each next match. The guide to Find and Replace in Excel covers the full search options.

Practise it#

F4 saves time only once it is a habit. Try the tax exercise on this page, then open the relative vs absolute references lesson to fill a formula down, watch it break, and fix it with $ and F4 in a live spreadsheet. For the editing side, the edit, clear and undo lesson has you fix cells, cancel edits and undo mistakes. Each step is checked instantly.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Work out the tax for each item using the single rate in E1. Click C2, type =B2*E1, put the cursor on E1, press F4 to make it $E$1, then press Enter. The answer is =B2*$E$1.

fx
ABCDEF
1
Item
Price
Tax
Tax rate
0.2
2
Headset
50
3
Keyboard
35
4
Webcam
80
5
6
7

Tip: Lock the tax rate with $ signs so it stays on E1 when you fill down.

Practise this in a lesson

LessonRelative vs absolute references ($)Lock a cell with $ so it doesn't move when you copy a formula, one of the most-tested Excel skills.LessonFreeEdit, clear and undoReplace a cell, fix part of a cell without retyping it, cancel an edit, clear cells and undo mistakes.

Frequently asked questions

What does F4 do in Excel?

+

While you edit a formula, F4 adds or changes the $ signs on the reference at the cursor. When you are not editing, it repeats your last action, like inserting a row or applying a fill colour.

What is the F4 shortcut on a Mac?

+

To toggle references, press fn+F4 or ⌘T while editing the formula. To repeat the last action, press ⌘Y.

Why is F4 not working in Excel?

+

On most laptops, F4 is a media or brightness key by default. Press Fn+F4, or turn on Fn Lock. Also check that you are editing the formula, with the cursor inside a cell reference.

How do I add $ to all references in a formula at once?

+

Select the whole formula text in the formula bar, then press F4. Excel changes every reference in the selection to the next type together.

What does Alt+F4 do in Excel?

+

Alt+F4 closes the Excel window on Windows. Excel asks to save unsaved changes first, but it's easy to press by mistake when you mean F4.

Sources

  • Switch between relative, absolute, and mixed references - Microsoft Support
  • Undo, redo, or repeat an action - Microsoft Support
  • Keyboard shortcuts in Excel - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does F4 do in Excel?
  2. How F4 adds $ signs to references
  3. How to change every reference at once
  4. How F4 repeats your last action
  5. Why is F4 not working?
  6. F4 in a job test
  7. Other F4 shortcuts to know
  8. Practise it

Keep reading

Basics· 5 min read

How to Copy a Formula Without Changing Its References

To copy a formula without changing its references, lock them with dollar signs before you copy: $F$1 always points at F1. To keep a formula exactly as it is, cut and paste it instead (a moved formula keeps its references), copy its text from the formula bar, or press Ctrl+' (⌃' on a Mac) to copy the formula above.

Basics· 4 min read

Edit, Clear, Undo and Redo in Excel Without the Mouse

The edit cell Excel shortcut is F2 on Windows. On a Mac, press Control+U or fn+F2. It opens the cell with the cursor at the end, so you can fix part of it without retyping. Esc cancels an edit, Delete clears the selected cells, Ctrl+Z (⌘Z) undoes your last change and Ctrl+Y (⌘Y) redoes it.

Basics· 6 min read

Excel Cell References Explained for Beginners

An Excel cell reference is the address of a cell: its column letter, then its row number, such as B3. Formulas use references instead of typed numbers, so the result updates when the data changes. References are relative (B3) by default and move when you copy them. Add dollar signs ($B$3) to lock them.

More on basics

  • Find and Replace in Excel (Ctrl+H) Tips
  • Freeze Panes in Excel: Keep Headers in View
  • Insert and Delete Rows and Columns Fast in Excel
  • How to Merge Cells in Excel, and When Not To
  • Mixed References in Excel: $A1 vs A$1 Explained
  • How to Multiply in Excel: Cells, Columns and Constants
All basics articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free