Excel Repeat Action Shortcut: When to Use Ctrl+Y or F4

How-to basics · Updated November 3, 2026

Excel Repeat Action Shortcut: When to Use Ctrl+Y or F4

In Excel for Microsoft 365 on Windows, press Ctrl+Y or F4 to repeat the last action when Excel can repeat it. Ctrl+Y can also redo an action you just undid, so whether it repeats or redoes depends on what you did immediately beforehand.

Which Excel shortcut repeats an action?

For most repeatable commands in desktop Excel for Windows, F4 is the dedicated repeat-last-action key. Ctrl+Y can do the same, and it is also Excel’s redo shortcut. For example, apply a format to one cell, select another cell or range, and press F4 to apply that formatting again. If you have just undone a change with Ctrl+Z, Ctrl+Y normally restores that change instead.

The shortcut repeats an eligible Excel operation; it does not mean that every key press, edit, or calculation can be replayed. Excel maintains a history of actions it can undo or redo, and a separate repeat behavior is available only for commands that support it. If the most recent operation cannot be repeated, pressing F4 may appear to do nothing.

This is different from repeating the contents of a cell. To copy a value or formula into cells below, use Fill Down, commonly Ctrl+D. To fill cells to the right, use Ctrl+R. Those shortcuts perform specific fill operations rather than replaying the last general command.

How to repeat a command with F4

Use F4 when you want to apply a recent command again elsewhere in the worksheet. A reliable way to try it is to repeat a formatting change:

  1. Select a cell and apply a formatting change, such as bold text using Ctrl+B.
  2. Select a different cell or a range that should receive the same change.
  3. Press F4. If Excel recognizes the prior operation as repeatable, it applies that change to the new selection.

The order matters: make the change first, then select the target. If you perform another operation in between, Excel may treat that as the latest action instead. Some commands also work only when the new selection is appropriate for the original command. For instance, a command applied to a single cell may not have the intended effect when the next selection is a multi-cell range.

F4 acts on the active workbook and worksheet context. It is not a general-purpose playback button for a sequence of steps. If you formatted a cell, entered data, sorted a table, and then changed a chart, F4 will not replay that entire sequence. It may repeat only the latest eligible action, or none if the last action is not repeatable.

Ctrl+Y: repeat versus redo

Ctrl+Y has two closely related roles, which is why people sometimes see different results from the same shortcut. If a recent action was undone with Ctrl+Z, Ctrl+Y redoes it. In that case it restores the undone change rather than applying a new copy of the last command to a different selection. When there is no pending undone action and the last command is repeatable, Ctrl+Y may repeat that command instead.

For example, suppose you change a cell’s font color, press Ctrl+Z, and then press Ctrl+Y. The color change returns because Excel is redoing it. By contrast, if you format one cell and then select another cell without undoing the change, F4 or Ctrl+Y can repeat the formatting operation, if Excel supports repeating that particular action.

Undo and redo work with Excel’s action history, not with a saved copy of the workbook. Saving does not make Ctrl+Y a shortcut for repeating a formula calculation, nor does it make every past edit available indefinitely. Some operations clear or affect the available undo history. When the result is important, check the worksheet after using the shortcut rather than assuming it performed the intended operation.

What can and cannot be repeated

Many straightforward formatting and editing commands can be repeated, but repeatability is determined by the command, not simply by whether it was the most recent thing you did. Excel does not promise that every ribbon command or mouse action has a repeat equivalent. A command may be unavailable to repeat if it depends on a one-time choice, affects a complex object, or cannot sensibly be applied to the new selection.

Examples that are often useful to try include applying a format, such as bold, to a second selection, or repeating a simple editing command in another suitable location. Treat these as practical examples rather than a guarantee for every workbook configuration. If F4 does nothing, the operation may not be repeatable, or Excel may be interpreting the key for another purpose.

Repeating an action is also not the same as copying a cell, reproducing a series, or running a macro. If you need the same value in many cells, copy and paste or use a fill command. If you need a repeated multi-step workflow, consider an Excel feature designed for that purpose, such as a recorded macro, rather than expecting F4 to remember a whole procedure.

F4 inside a formula is a different feature

F4 has another well-known Excel use: while editing a formula, it cycles through reference styles. For example, when the insertion point is on a cell reference such as A1 in a formula, pressing F4 can cycle that reference through A1, $A$1, A$1, and $A1. The dollar signs control which part of the reference remains fixed when a formula is copied.

This reference behavior is not the repeat-last-action command. It applies while you are editing a formula and have a cell reference selected or the insertion point positioned on it. If you press F4 in that situation, Excel may change the reference instead of repeating formatting or another worksheet action. Press Enter to finish editing, or Esc to cancel the edit, before trying to repeat a prior command.

For example, if a formula in B2 refers to A2 and you want the column to stay fixed when copying the formula across, editing the formula and cycling the reference to $A2 may be appropriate. If your goal is instead to apply the same number format to another cell, leave formula-editing mode, select the destination, and use the repeat shortcut.

Windows, Mac, and Excel for the web

This guidance is for Excel for Microsoft 365 on Windows, where Ctrl+Y and F4 are the common choices for redo and repeat, subject to the context described above. On a Mac, Command+Y is the usual redo/repeat shortcut. Mac keyboards and system settings vary, so the function keys may require Fn or may be assigned to a system function; Command+Y is generally the more practical starting point in Excel for Mac.

Excel for the web runs in a browser, so the browser, operating system, and keyboard can affect whether a function key reaches Excel. Ctrl+Y is used for redo in the web app, but do not assume every desktop repeat behavior is available identically in the browser. If a shortcut is intercepted or does something unexpected, use the relevant command on Excel’s ribbon or check the keyboard shortcut help for the version you are using.

Shortcuts can also differ when a worksheet is being edited in a browser alongside other applications, or when a laptop maps F4 to a hardware feature. That does not mean Excel has changed the meaning of repeat; it means the key may not be delivered to the workbook. Try the alternate shortcut, use the Fn key if appropriate for the keyboard, or use the ribbon command for the action you want.

Common problems and quick fixes

  • F4 changes a formula reference: You are likely editing a formula. Finish or cancel the edit, select the destination, and try the repeat shortcut again.
  • Ctrl+Y restores a change you undid: That is redo, not a fresh repeat. Use F4 for a repeatable command when you are not trying to redo an undo.
  • Nothing happens: The last operation may not support repetition, or a different operation may have replaced it as the most recent action. Try a simple formatting change to check the key, then test again.
  • F4 triggers a laptop feature: Use Fn+F4 if the keyboard requires it, or use Ctrl+Y in Windows when appropriate. Keyboard settings differ by device.
  • The wrong cells change: Before pressing the shortcut, verify the active selection and consider undoing immediately with Ctrl+Z if the result is not what you wanted.

When troubleshooting, perform a small test on a blank or unimportant area rather than experimenting on critical data. This helps distinguish a shortcut issue from an operation that Excel simply cannot repeat in the current context.

When to use a different shortcut

Choose the shortcut that matches the task rather than using F4 as a universal repeat command. Use Ctrl+Z to undo a recent action, and Ctrl+Y to redo an action that was undone. Use F4 to repeat a recent eligible command on a new selection. Use Ctrl+D or Ctrl+R when you specifically want to fill cells down or right.

For repeated formatting across nonadjacent cells, Format Painter can be more predictable: select a formatted cell, choose Home > Format Painter, then apply the format to the target. Double-clicking Format Painter keeps it active for multiple target selections; press Esc when finished. This is useful when the command you need is a format transfer rather than a general repeat of the last operation.

If the same multi-step task must be repeated regularly, a table feature, a reusable template, or a macro may be more suitable. A macro can automate a defined sequence, but it is a different tool from a single-key repeat and should be used carefully. For ordinary one-step formatting or editing, F4 is quicker and needs no setup.

Frequently Asked Questions

What is the Excel shortcut to repeat the last action?

In Excel for Windows, press F4 or Ctrl+Y when the last command is repeatable. Ctrl+Y may instead redo an action you just undid.

Does Ctrl+Y repeat or redo in Excel?

It can do either. After Ctrl+Z, Ctrl+Y normally redoes the undone action. In other contexts, it can repeat the last eligible command.

Why does F4 put dollar signs in my formula?

F4 cycles cell-reference types while you edit a formula. Finish or cancel formula editing before using F4 to repeat a worksheet action.

Can Excel repeat every action?

No. Excel can repeat only commands that support repetition, and the new selection must suit the command. Some actions have no repeat behavior.

What is the Mac shortcut for repeating an action in Excel?

Command+Y is the usual Excel for Mac shortcut for redo and repeat behavior. Function-key behavior varies by keyboard, so F4 may require Fn or may not be the best option.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.