Excel Shortcut to Repeat the Last Command or Action

How-to basics · Updated November 3, 2026

Excel Shortcut to Repeat the Last Command or Action

In Excel for Microsoft 365 on Windows, press F4 or Ctrl+Y to repeat the last action when that action is repeatable. Select the next cell or range first; on a Mac, the usual repeat shortcut is Command+Y.

What the repeat shortcut does

Excel’s repeat command applies a recent action again, often to a different selection. For example, if you make a cell bold, select another cell, and press F4, Excel can apply bold there too. It saves you from reopening a ribbon command or repeating the same sequence of clicks.

The key qualification is that Excel does not record every possible operation as a repeatable command. F4 and Ctrl+Y work when the most recent action can be repeated in the current context. If the command is unavailable, pressing the shortcut may do nothing, or Ctrl+Y may behave as a redo command instead. The shortcut is useful, but it is not a general-purpose replay button for everything you have done in a workbook.

How to repeat an action in a worksheet

For the common case, use this sequence:

  1. Perform an action once, such as applying a number format or bold formatting.
  2. Select the cell or range where you want the same action applied.
  3. Press F4, or press Ctrl+Y if F4 is inconvenient.

For example, suppose you set cell B2 to display a date in a particular format. Select B3 and press F4 to apply the same formatting action to that cell, if Excel recognizes the previous action as repeatable. You can also select a range before repeating an action so that it applies to the selected cells. The target selection matters: choose the destination before invoking the shortcut rather than expecting Excel to guess where you want the action repeated.

Repeating an action is most helpful when you need to apply one simple change to several separate places. If you are formatting a continuous range, it may be quicker to select the entire range before using the ribbon command the first time. For scattered cells, repeat can avoid opening the same menu repeatedly.

Actions that are commonly repeatable

Many straightforward formatting and editing commands can be repeated, but repeatability depends on the command and the current state of Excel. Typical useful examples include applying a font style, changing a fill or font color, setting a number format, or carrying out a simple edit that Excel can perform again on the current selection.

  • Formatting: Apply bold to one cell, select another, and try F4 to apply the same formatting action.
  • Number display: Set a cell to a particular number format, then use the repeat command on another suitable cell.
  • Repeated edits: For an uncomplicated action that Excel marks as repeatable, select a new target and use F4 or Ctrl+Y.

These are examples, not a guarantee that every command in each category will repeat. Some operations depend on a dialog, selected object, or specific range, and Excel may not offer them as repeatable actions. If a shortcut produces no visible result, check whether the original command is one Excel can repeat and whether the new selection is appropriate.

Why the shortcut sometimes appears not to work

The most common source of confusion is that a shortcut’s effect depends on what Excel is doing at that moment. F4 has another well-known role: while you are editing a formula, it cycles the reference style for a selected cell reference. In a formula such as =A1, placing the insertion point on the reference and pressing F4 changes it among relative, absolute, and mixed forms. In that context, F4 is not repeating the last worksheet action.

Excel may also have no repeatable action available. A command that opens a dialog, changes the workbook in a way Excel cannot repeat, or relies on an earlier selection may not be replayed as expected. The action may also have been interrupted by another command, so the most recent eligible action is no longer the one you intended. Try performing the desired action once more, select the new target, and then use the shortcut immediately.

On laptops, the top-row keys may control brightness, sound, or other hardware features by default. If pressing F4 changes a hardware setting instead of repeating an Excel action, try holding the Fn key while pressing F4. The exact behavior depends on the computer’s keyboard settings. Ctrl+Y is a useful alternative on Windows when the function-key row is inconvenient.

F4, Ctrl+Y, and Ctrl+Z: the difference

F4 and Ctrl+Y are both associated with repeating the previous action in Excel for Windows, but Ctrl+Y is also Excel’s redo shortcut. Redo restores an action that you just undid. This means Ctrl+Y can act as redo when there is an undone action waiting to be restored, while in other situations it can repeat a supported action. F4 is often the clearest choice when your intention is to apply the last command again and you are not editing a formula.

Ctrl+Z does the opposite of undoable actions: it reverses recent changes. It does not repeat a command. A practical sequence might be to apply a format, press Ctrl+Z to undo it, and then press Ctrl+Y to restore it. That is redo, not a fresh application of the formatting to a different cell. To apply the format to another cell, select that cell and use F4 or Ctrl+Y while Excel has the repeatable action available.

When uncertain, watch what happens to the worksheet and the Undo command on the Quick Access Toolbar. If Ctrl+Y restores something you just undid, it is functioning as redo. If it applies the previous action to your current selection, it is repeating that action.

Windows, Mac, and Excel for the web

This guidance is for Excel for Microsoft 365 on Windows. On a Mac, Command+Y is the usual shortcut to repeat the last action. Mac keyboards and settings can affect function-key behavior, and F4 may be assigned to a hardware or system function. When working with formulas on Mac, the shortcut for cycling a reference style differs from Windows; Command+T is used for that purpose in Excel for Mac.

In Excel for the web, keyboard shortcuts can depend on the browser and operating system, and some key combinations may be intercepted outside Excel. If F4 or Ctrl+Y does not produce the expected result in the browser, use the relevant command on the ribbon where available, or check Excel’s current keyboard-shortcut help for the web version. Do not assume that a desktop function key behaves identically in every browser.

Repeat versus copy and paste

Repeat is not the same as copying a cell. When you copy and paste, Excel transfers the copied content or formatting according to the paste option you choose. The repeat command asks Excel to perform the previous eligible action again on the current selection. That distinction matters if the earlier operation involved a specific command rather than copying a complete cell.

For instance, if you only want to reuse a cell’s appearance, Format Painter or Paste Special may give you more control than repeating an action. If you need to place the same value or formula in multiple locations, copying and pasting, filling, or using the fill handle may be a better fit. Repeat is ideal when the exact last action is what you want to do again; it is not a substitute for choosing the right transfer method.

A quick way to troubleshoot repeat

If the shortcut does not seem to work, use this short checklist before repeating the action by hand:

  • Confirm that Excel, rather than another app or a laptop hardware control, received the keypress.
  • Make sure you are not in formula-editing mode, where F4 may change a cell reference.
  • Click or select the intended destination cell or range before pressing the shortcut.
  • Try Ctrl+Y on Windows, or Command+Y on Mac, if the function key is unavailable.
  • Repeat the original command once and immediately try the shortcut again on a suitable target.

If the action still does not repeat, use its ribbon command or an alternative such as copy and paste. That is usually faster than trying to force a command that Excel does not consider repeatable.

Frequently Asked Questions

What is the shortcut to repeat the last action in Excel?
In Excel for Microsoft 365 on Windows, press F4 or Ctrl+Y. On a Mac, use Command+Y for repeat.

Does F4 always repeat the last command?
No. F4 repeats only actions Excel can repeat in the current context. While editing a formula, it can instead cycle the selected cell reference between relative, absolute, and mixed forms.

Is Ctrl+Y repeat or redo in Excel?
It can do either, depending on the state of the workbook. It redoes an action you have undone when one is available; otherwise, it can repeat a supported last action.

Why does F4 change my laptop’s volume or brightness?
Your keyboard may assign its top-row keys to hardware controls. Try Fn+F4, or use Ctrl+Y in Excel for Windows if that shortcut is available on your keyboard.

How do I repeat formatting on another cell?
Apply the formatting once, select the destination cell or range, and press F4 or Ctrl+Y on Windows. If Excel does not repeat it, use the ribbon formatting command, Format Painter, or Paste Special instead.

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.