To undo an action in Excel for the web, press Ctrl+Z (Windows) or Cmd+Z (Mac), or click the Undo arrow at the top of the window. This reverses your most recent change, whether it's typing, formatting, deleting a cell, or inserting a row. You can repeat it to undo multiple actions in sequence. If you need to redo something you just undid, press Ctrl+Y (or Cmd+Y) or click the Redo arrow.

What You'll Need

  • A web browser (Chrome, Edge, Firefox, or Safari) with Excel for the web open.
  • An active internet connection.
  • You must be signed in to your Microsoft account (work, school, or personal) to access the file.

Step-by-Step

  1. Open your workbook in Excel for the web. Go to office.com, sign in, and open the file from OneDrive, SharePoint, or your recent files list.
  2. Make a change that you want to undo—for example, type something in a cell, apply bold formatting, or delete a column.
  3. Use the keyboard shortcut: Press Ctrl+Z (Windows) or Cmd+Z (Mac). This undoes the last action immediately. If you want to undo several steps, keep pressing the shortcut until you've reverted to the desired state.
  4. Use the toolbar button: Look at the top-left corner of the Excel window (next to the AutoSave toggle). You'll see a curved arrow pointing left—that's the Undo button. Click it once to undo the last action. Click it again to undo the previous action, and so on.
  5. Check the Undo history (if available): In some versions of Excel for the web, clicking the small drop-down arrow next to the Undo button shows a list of recent actions. You can click a specific action in that list to undo everything up to that point. If you don't see a drop-down, you can only undo one step at a time.
  6. Redo an action if you change your mind: Press Ctrl+Y (Windows) or Cmd+Y (Mac), or click the curved arrow pointing right (Redo) next to the Undo button. This reapplies the last action you undid.

Note: The exact labels and placement of the Undo/Redo buttons can vary slightly depending on your browser, screen size, and whether you're using the personal or work version of Excel for the web. The keyboard shortcuts always work.

Common Mistakes

  • Assuming Undo works after saving or closing: In Excel for the web, the Undo history is cleared when you close the browser tab or refresh the page. If you close the file and reopen it, you cannot undo changes made in the previous session. Always undo before you navigate away.
  • Using the browser's back button: Pressing the browser's back button will not undo an Excel action—it will navigate you away from the page, and you might lose unsaved changes. Use Ctrl+Z instead.
  • Undoing too many steps: If you press Ctrl+Z too many times, you might revert changes you actually wanted to keep. Check the sheet after each undo to see if you've gone too far, then use Redo (Ctrl+Y) to step forward again.
  • Not noticing that Undo is disabled: Some actions in Excel for the web cannot be undone, such as certain file operations (e.g., deleting a sheet). In those cases, the Undo button will be grayed out. You'll need to manually recreate the content or use a backup.

Tips

  • Use Undo immediately after a mistake: The longer you wait, the more actions pile up, and the harder it is to isolate the one you want to revert. If you make a typo, undo right away.
  • Combine with Redo: If you're unsure whether an undo was correct, use Redo to reapply the action. You can toggle back and forth with Ctrl+Z and Ctrl+Y to compare states.
  • Save a version before big changes: Excel for the web has a Version History feature (File > Info > Version History) that lets you restore an earlier version of the file. This is more powerful than Undo for large changes—use it if you need to go back to a state from hours ago.
  • Use keyboard shortcuts for speed: Ctrl+Z and Ctrl+Y are much faster than reaching for the mouse, especially if you're editing a lot of data.
  • Be careful with collaborative edits: If you're working in a shared workbook, Undo only affects your own changes. It won't undo changes made by other collaborators. If you see a change you didn't make, you can't undo it—you'll need to ask the other person to revert it.

Troubleshooting

Undo button is grayed out or Ctrl+Z does nothing: This usually means there is nothing to undo. Check if you've made any changes since opening the file. If you just opened the file and haven't edited anything, Undo will be unavailable. Also, if you've just refreshed the page, the undo history is cleared.

Undo is not reverting the action you expect: Excel for the web groups certain actions together. For example, formatting a range of cells might be treated as one undo step, even if you applied multiple formatting options. If you want to undo a specific formatting change, you might need to undo several steps or redo and then manually adjust.

Ctrl+Z is opening the browser's undo dialog: In some browsers, Ctrl+Z might conflict with browser shortcuts. Try using the on-screen Undo button instead. Also, ensure you're not in a text input field outside of Excel (like the address bar).

You closed the file and want to undo a change: Undo is gone, but you can use Version History. Go to File > Info > Version History and select an earlier version to restore. This will replace the current version with the older one. Be aware that this might overwrite changes made by others if you're collaborating.

Undo works but the sheet looks wrong: If you undo a formula, the cell might show a #REF! error or a different value. This is normal. You can redo (Ctrl+Y) to bring back the formula, or manually fix the cell.

Frequently Asked Questions

Can I undo more than one action at a time?

Yes, you can press Ctrl+Z multiple times to undo several actions in reverse order. Some versions of Excel for the web also have a drop-down arrow next to the Undo button that lists recent actions—clicking an older action in that list will undo everything up to that point.

Does Undo work after I save the file?

Yes, saving the file (or AutoSave) does not clear the undo history. You can still undo actions after saving, as long as you haven't closed the browser tab or refreshed the page. Once you close or refresh, the undo history is lost.

Why is my Undo button missing?

If you don't see the Undo button, it might be hidden because your browser window is too small. Try widening the window or using the keyboard shortcut Ctrl+Z (Cmd+Z on Mac). In some cases, you can also access Undo from the right-click context menu (right-click a cell and look for Undo).

Can I undo changes made by someone else in a shared workbook?

No, Undo only reverts your own changes. Changes made by other collaborators cannot be undone by you. You can ask them to undo their changes, or you can use Version History to restore an earlier version, but that will affect the whole file.

Is there a limit to how many undo steps I can have?

Excel for the web does not publicly document a specific limit. In practice, the undo history is limited by available memory and the complexity of actions. You can usually undo dozens of steps, but very large operations (like inserting a massive table) might reduce the history. If you run out of undo steps, use Version History.

What if I accidentally undo something and then make a new change?

If you undo an action and then perform a new action (like typing a different value), the redo history is cleared. You cannot redo the undone action after that. You'll need to manually recreate the change or use Version History if you need to go back.