Cellwise Start free

Essentials shortcuts

Undo, redo and repeat shortcuts in Excel

Quick answerUndo is CtrlZ on Windows and CommandZ on a Mac. Redo is CtrlY on Windows, and CommandY or CommandShiftZ on a Mac. On Windows, F4 or CtrlY also repeats your last action, such as inserting a row or applying a fill color, on a new selection.

The keys

ShortcutWindowsMac
Undo the last actionCtrlZCommandZ or ControlZ
RedoOn Windows, Ctrl+Y repeats your last action when there is nothing to redo.CtrlYCommandY or ControlY or CommandShiftZ
Repeat the last action, such as inserting a row or applying a formatMicrosoft's Mac list has no Repeat key: Cmd+Y is Redo there. Inside a formula, F4 switches $ signs instead.F4 or CtrlY—No Mac shortcut in Microsoft's list

Checked against Microsoft's official lists on . Where Microsoft lists a key for one platform only, the other column says so instead of guessing.

Repeat: the hidden time-saver

After you do something once, select the next place and press F4. It repeats the last action there: insert a row, delete a column, apply a border or a fill color. To color ten scattered cells, color one with the ribbon, then click each of the others and press F4.

Repeat works for one action at a time, and not for everything; if F4 does nothing, that action cannot be repeated. Microsoft's Mac list has no Repeat key.

How far back undo goes

When Ctrl+Z does nothing

Why a shortcut sometimes does nothing

Laptop function keys

On many laptops the top row changes volume or brightness first, so F2 or F4 does nothing in Excel. Hold Fn with the key (FnF4), or turn on the laptop's function-key lock. On many Windows laptops that lock is FnEsc, but it varies by brand, so look for a small padlock or "Fn" icon on the Esc key.

F4 vs Cmd+T on a Mac

On Windows, F4 has two jobs: while you edit a formula it switches a reference between A1, $A$1, A$1 and $A1, and the rest of the time it repeats your last action. On a Mac, CommandT and F4 both switch the reference, but CommandT creates a table when you are not editing a formula. On a Mac laptop F4 may need Fn.

Related shortcuts

ShortcutWindowsMac
Switch a reference between A1, $A$1, A$1 and $A1 How to: Absolute reference shortcut in Excel (F4 and Cmd+T) Put the cursor on a reference while editing a formula. Outside a formula, F4 on Windows repeats your last action.F4CommandT or F4
Insert cells, rows or columns How to: Insert row shortcut in Excel Select whole rows (Shift+Space) or columns (Ctrl+Space) first and they go in straight away; otherwise the Insert dialog asks which way to shift.CtrlShiftPlusWeb CtrlPlusControlShift=
Save the workbookCtrlSCommandS or ControlS

FAQ

What is the redo shortcut in Excel?

Ctrl+Y on Windows and the web. On a Mac, Cmd+Y or Cmd+Shift+Z.

What does F4 do in Excel?

Outside a formula, F4 on Windows repeats your last action. While you edit a formula, it switches the reference under the cursor between relative and absolute.

Can I undo after saving?

Yes, as long as the workbook is still open. Once it is closed, the undo list is gone; use Version History if the file is on OneDrive or SharePoint.

Related guides

In the glossary: Macro

All essentials shortcutsAll Excel shortcutsPrintable sheet