Excel Keyboard Shortcuts to Edit a Cell

How-to basics · Updated November 19, 2026

In Excel for Microsoft 365 on Windows, select a cell and press F2 to edit its existing contents; the insertion point appears at the end. Press Enter to keep the change or Esc to cancel it. On a Mac, the usual shortcut for editing the active cell is Control+U.

What F2 Does in Excel

F2 starts editing the contents of the active cell without first deleting them. The active cell is the one outlined on the worksheet. If it contains text, a number, or a formula, pressing F2 lets you work with that existing entry rather than start a replacement. Excel normally places the insertion point at the end of the cell’s contents, where you can type, delete, or move through the entry.

Once editing begins, Excel is working inside the cell entry. The status bar at the bottom of the window indicates that Excel is in Edit mode. This is different from simply selecting a cell: when a cell is only selected, keyboard input can replace its contents, while in Edit mode you can change just part of the entry.

For example, suppose B3 contains the text “Quarterly sales report.” Select B3 and press F2, then use the arrow keys or the mouse to place the insertion point between “sales” and “report.” You can add a word there without retyping the whole cell. The same approach works for correcting a typo or changing a number within a longer text entry.

Edit a Cell Step by Step

Use this sequence when you want to preserve most of a cell’s contents and make a targeted change:

  1. Select the cell you want to change. Check the Name Box or the row and column headings if you are unsure which cell is active.
  2. Press F2 on Windows. On a Mac, press Control+U. If the function keys on your Mac control hardware features, you may need to adjust the keyboard’s function-key setting or use the appropriate Fn key with an F-key shortcut.
  3. Move the insertion point to the part you want to change. Use the arrow keys to move through the entry, or click the desired position if in-cell editing is enabled.
  4. Type or delete the needed characters. For a formula, take care to preserve the operators, parentheses, and cell references you still need.
  5. Press Enter to commit the edit. Excel normally moves the selection down afterward, although the direction can be changed in Excel’s options.

If you change your mind before committing, press Esc. Excel discards the changes made in that editing session and restores the cell’s prior contents. If you have already pressed Enter, the edit is committed; use Ctrl+Z on Windows or Command+Z on a Mac to undo it, provided no later action has made that inappropriate.

Editing Existing Content Versus Replacing It

A common source of accidental data loss is confusing edit mode with cell selection. When a cell is selected but not being edited, typing a letter, number, or formula begins a new entry and replaces the old contents. That is useful when you intend to overwrite a whole value, but it is not the right action for changing one character.

To preserve existing content, use F2 on Windows or Control+U on a Mac before typing. Alternatively, double-click the cell or click in its entry on the formula bar. By contrast, if you want to replace the entire value, select the cell and type the new value directly; you do not need to enter Edit mode first.

These behaviors also explain why pressing an arrow key can appear to do different things. With a cell merely selected, an arrow key usually selects a neighboring cell. While editing, an arrow key moves the insertion point through the entry. If you begin typing while a cell is selected, Excel treats that input as a replacement entry, not as a request to append text.

Useful Keys While You Are Editing

F2 is the shortcut that gets you into the cell entry, but other keys help complete or control the edit. Their effect depends on whether Excel is still editing the cell or has returned to ordinary worksheet navigation.

  • Enter: Accepts the edit and leaves Edit mode. Excel usually selects the cell below.
  • Esc: Cancels the current, uncommitted edit.
  • Alt+Enter on Windows: Inserts a line break within a cell while you are editing its contents. On a Mac, use Control+Option+Return for a line break in a cell.
  • Ctrl+Enter on Windows: Enters the current content into all cells in a selected range. This is a range-entry shortcut, not the usual way to edit one cell. On a Mac, Control+Return is commonly used for the corresponding multi-cell entry.
  • Delete or Backspace: Removes characters at or around the insertion point according to the editing context. Confirm the caret position before using either key.

For example, to put a two-line address in one cell, edit the cell, type the first line, insert a line break with Alt+Enter on Windows, and type the second line. Then press Enter to finish. If the text does not display on two lines, turn on wrapping with Home > Wrap Text; the line break and text wrapping are related but separate things.

Editing Text, Numbers, and Formulas

The F2 shortcut works with different kinds of cell contents, but the consequences of a small edit vary. In a text label, changing a word usually affects only the displayed text. In a number, changing a digit changes the underlying value used by calculations. Check the formula bar if you need to see the stored entry rather than only its formatted appearance; a displayed date or currency value may look different from the value Excel stores.

F2 is especially useful for a long formula because it lets you inspect or amend the formula already in the cell. For example, if a formula needs one cell reference changed, editing the existing expression can be safer than replacing the entire formula. After editing, check that the formula still starts with an equals sign and that parentheses and operators remain in the intended order. Press Enter to calculate and commit it. If the result is unexpected, inspect the formula bar before making further changes.

When you edit a formula, Excel may show colored outlines around referenced cells. This is a visual aid for identifying references, not a sign that the formula has already been changed incorrectly. A useful habit is to confirm both the formula text and the resulting value after you commit an edit, especially when the formula feeds totals, reports, or other worksheets.

When F2 Does Not Edit Inside the Cell

If F2 does not put the insertion point in the cell, first check whether the worksheet is protected or whether another dialog or object has focus. A selected chart, dialog box, or other worksheet object may respond differently because Excel is not treating the cell as the active editing target. Click the cell itself, then try the shortcut again.

Excel also has a setting that controls whether you can edit directly in cells. On Windows, open File > Options > Advanced and check Allow editing directly in cells. If that option is turned off, F2 can still let you edit the selected cell, but the editing cursor appears in the formula bar rather than within the worksheet cell. This can be useful when you prefer to make changes in the formula bar, but it can make the shortcut seem as if it is behaving differently.

On a laptop, the F2 key may be assigned to a hardware action such as changing brightness or volume. Try holding Fn while pressing F2, or change the keyboard’s function-key behavior in the computer’s settings. The exact setting depends on the device. If you use a remote desktop or browser-based Excel, the operating system or browser may also intercept a function key; clicking the formula bar or double-clicking the cell provides a practical alternative.

If the edit disappears, consider whether you pressed Esc rather than Enter. If the previous contents are already gone, immediately try Undo—Ctrl+Z on Windows or Command+Z on Mac—before taking other actions. Undo can reverse a committed edit, but it is not a substitute for checking the selected cell and insertion point before typing.

Windows, Mac, and Excel for the Web

This article uses Excel for Microsoft 365 on Windows as its default. On Windows, F2 is the standard shortcut to edit the active cell. On Mac, Control+U is the usual equivalent. Mac keyboards and system settings vary, so function-key behavior can depend on whether the top row is configured for standard F keys or hardware controls. The Mac Return key corresponds to Enter for committing an edit, and Esc cancels it.

Excel for the web also supports editing cells, but keyboard shortcuts can be affected by the browser and the computer’s function-key setup. If F2 does not work as expected, select the cell and use the formula bar, or double-click the cell if in-cell editing is available. The formula bar is also a dependable option when you need to inspect a long formula or text entry that is difficult to navigate inside a narrow column.

Keyboard shortcuts can differ across Excel platforms and between desktop versions, so do not assume that a Windows shortcut will work identically on Mac or in a browser. When using a shared workbook or giving instructions to colleagues, name the platform along with the key combination. That small detail prevents confusion, especially when a shortcut uses a function key.

Alternatives to the F2 Shortcut

F2 is quick when your hands are on the keyboard, but it is not the only way to change part of a cell’s contents. Double-clicking a cell opens it for direct editing, and clicking the formula bar lets you work with the full entry above the worksheet grid. These methods are helpful when F2 is intercepted by a laptop or browser, or when you want to inspect a long formula before changing it.

Choose the method that suits the kind of edit:

  • Use F2 or Control+U for a quick, keyboard-driven edit of the active cell.
  • Double-click the cell when you want to position the insertion point visually inside the displayed entry.
  • Use the formula bar when the cell is narrow, the contents are long, or you want a clearer view of a formula.
  • Type directly into a selected cell when replacing its entire contents is intentional.

For a very long text entry, the formula bar is often easier to navigate than the cell because the worksheet column may show only part of the content. For a short correction, F2 is usually faster. None of these methods changes the need to commit with Enter or cancel an uncommitted edit with Esc.

Frequently Asked Questions

What is the shortcut to edit a cell in Excel?
In Excel for Microsoft 365 on Windows, select the cell and press F2. On a Mac, use Control+U to edit the active cell.

How do I edit a cell without deleting its contents?
Select the cell and press F2 on Windows or Control+U on Mac. Then move the insertion point to the part you want to change. Typing while the cell is only selected replaces its existing entry.

How do I cancel editing a cell?
Press Esc before committing the edit. Excel restores the contents from before the current edit session. If you already pressed Enter, use Undo to reverse the committed change.

Why does F2 open the formula bar instead of editing in the cell?
The Allow editing directly in cells setting may be off. In Windows Excel, find it under File > Options > Advanced. With that setting off, you can still edit the entry through the formula bar.

How do I add a new line inside an Excel cell?
While editing the cell, press Alt+Enter on Windows. On a Mac, use Control+Option+Return. Press Enter afterward to commit the cell entry.

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.