You click a cell to fix one typo, start typing, and the whole entry vanishes instead of letting you change a single character. To change part of a cell, select it and press F2 (or double-click it), move the cursor to the mistake, fix it, and press Enter. Press Esc instead if you want to back out with nothing changed.
This covers Excel for Microsoft 365, Excel 2024 and Excel 2021 on Windows, with notes for Excel for the web.
Why Typing Replaces the Whole Cell
Excel treats a selected cell and a cell you’re editing differently. When a cell is merely selected (it has a thick border around it), anything you type replaces its contents completely. That’s useful for entering fresh data quickly, and it’s why a single keystroke can wipe out a long entry.
To change a few characters, you need Edit mode. In Edit mode, a blinking cursor sits inside the cell’s text, and Microsoft’s edit cell contents page notes that the word Edit appears in the lower-left corner of the Excel window. If you see Ready there instead, typing will overwrite the cell.
Edit mode also explains some puzzling grey buttons. While you’re editing, many commands are unavailable, such as conditional formatting and alignment changes. Finish or cancel the edit and they come back.
Three Ways to Start Editing a Cell
| Method | Where the cursor lands | Best for |
|---|---|---|
| Double-click the cell | Where you clicked | Quick fixes with the mouse |
| Select the cell, press F2 | At the end of the contents | Adding to an entry, keyboard work |
| Select the cell, click in the formula bar | Where you click in the bar | Long text and formulas |
Here’s how the F2 route works on a fictional inventory sheet. Teodor’s cell B14 reads Blue widgit, 12-pack and should read Blue widget, 12-pack.
- Click B14 (or move to it with the arrow keys).
- Press F2. The cursor appears at the end of the text and the lower-left corner shows Edit.
- Press the Left arrow until the cursor sits just after the extra i in widgit.
- Press Backspace twice to remove it and the t, then type et.
- Press Enter to keep the change.
The formula bar is the better choice when an entry is wider than its column or holds a long formula. Click the cell, then click inside the bar above the column letters, and edit the text there. The cell updates as you type. On many laptops, the F2 key also controls brightness or volume, so you may need to hold the Fn key with it.
Change Part of a Cell Without Retyping It
Once you’re in Edit mode, the cell behaves like a small text box.
- The Left and Right arrow keys move the cursor through the text instead of moving to other cells.
- Backspace deletes to the left of the cursor; Delete removes characters to the right.
- To replace a chunk of text, drag across it with the mouse (in the cell or the formula bar), or hold Shift and press the arrow keys, then type the new text over it.
- Press Insert to switch on Overtype, which replaces existing characters as you type. Press Insert again to switch it off.
- Press Alt+Enter to start a new line inside the same cell, which is handy for addresses or notes.
Editing a Formula
Formulas edit the same way. Select the cell and press F2, and Excel shows the formula instead of its result, with each cell reference colored to match a box on the sheet. Change a reference or a number, keep the equals sign at the start, and press Enter.
If you’ve made a mess of a formula and can’t see where, press Esc. The original formula comes back untouched.
Not sure whether a cell holds a typed value or a formula? Click it and look at the formula bar. A formula starts with an equals sign; a typed value doesn’t.
Finish, Cancel or Undo an Edit
How you leave Edit mode decides where the selection goes next:
- Enter keeps the change and moves to the cell below. To make Enter move a different way, go to File, Options, Advanced and change the Direction setting under After pressing Enter, move selection.
- Tab keeps the change and moves right; Shift+Tab moves left.
- Clicking another cell keeps the change and selects the cell you clicked.
- F2 leaves Edit mode with the cursor where it is.
- Esc throws away the edit, as long as you haven’t pressed Enter or Tab yet.
- Ctrl+Z (or the Undo button) reverses an edit after you’ve confirmed it.
One correction to a common belief: pressing Enter commits the cell, it doesn’t save the workbook. Press Ctrl+S or choose File, then Save to save your file. If the workbook lives in OneDrive or SharePoint, the AutoSave switch in the top-left corner of Excel can save changes as you go; Microsoft explains it on its AutoSave page.
When the Edit Looks Wrong After You Press Enter
Two display issues often look like failed edits.
The cell shows #####. The entry is fine; the column is too narrow to show it. Select the cell, go to Home, then Format, and choose AutoFit Column Width (or Column Width to type a size).
Long text is cut off or runs into the next cell. Select the cell, then on the Home tab choose Wrap Text in the Alignment group. You can’t change wrapping while you’re still in Edit mode, so press Enter first.
Edit Many Cells at Once
Edit mode changes one cell at a time. For repeated changes, two tools save a lot of clicking.
Put the Same Entry in Several Cells
Selecting a range and typing only fills the active cell. Instead, select the cells, type the entry, and press Ctrl+Enter. Microsoft’s enter data manually page documents this for entering the same data into several cells at the same time.
Fix the Same Mistake Everywhere With Replace
If widgit appears on 60 rows, don’t edit each one.
- Press Ctrl+H, or go to Home, then Find & Select, then Replace. (Ctrl+F opens the Find tab of the same dialog.)
- Type widgit in Find what and widget in Replace with.
- Click Find All first to see every match listed, then Replace All to change them, or Replace to step through one at a time.
- If a short word might match inside longer entries, click Options and turn on Match entire cell contents or Match case before replacing.
Microsoft’s find or replace page covers the extra options. On a Mac, the shortcut is Control+H.
When Excel Won’t Let You Edit
If you can’t get into a cell at all, the clue is usually on screen. Match what you see to the cause.
| What you see | Likely cause | Where to look |
|---|---|---|
| Double-click does nothing, but the formula bar works | In-cell editing is switched off | File, Options, Advanced |
| Yellow or red bar with Enable Editing or Edit Anyway | Protected View | The bar itself |
| Read-Only next to the file name, or a Marked as Final bar | The file is set to open read-only | File, Info |
| A message that the cell is on a protected sheet | Sheet protection | Review tab |
| A message that the file is locked or in use | Another person or device has it open | Close it elsewhere or co-author |
| Excel for the web won’t switch to editing | Permissions or unsupported features | Edit a Copy or Open in Desktop |
Double-Clicking Does Nothing
If double-clicking does nothing, in-cell editing might be turned off. Go to File, then Options, then Advanced, and under Editing options select Allow editing directly in cells. Click OK. While that box is cleared, you can still edit through the formula bar.
The Protected View Bar Appears
Excel opens some files in Protected View, a read-only mode where most editing is disabled. Microsoft’s Protected View page lists the usual triggers: files from the internet, some email attachments, files in unsafe locations, files blocked by File Block, files that fail validation, and files opened from someone else’s OneDrive.
Before you click: Protected View exists because files from unknown sources can carry harmful content. Only continue if you trust where the file came from.
- On a yellow bar, click Enable Editing.
- On a red bar, choose File, then Edit Anyway, again only for a trusted source.
Turning Protected View off for every file isn’t worth the risk. Clearing it one trusted file at a time is the safer habit.
The File Opens Read-Only
A file’s author can mark it as final (File, Info, Protect Workbook, Mark as Final), which shows a bar with an Edit Anyway button. Clicking Edit Anyway removes the read-only status for you.
Other read-only setups ask for a password to modify the file or suggest opening it read-only. If you don’t have the password, use File, then Save As to save your own copy under a new name and edit that. To set this up on your own files, see how to make a spreadsheet read-only for others.
The Sheet Is Protected
On a protected sheet, locked cells refuse changes and Excel shows a message saying so. If you know the password (or there isn’t one), go to Review, then Unprotect Sheet, or File, then Info, then Protect, then Unprotect Sheet. Microsoft’s protect a worksheet page adds a blunt warning: if you forget the password, Microsoft can’t retrieve it.
Sheet protection usually locks everything except cells the author chose to leave open. If you’re the author and want people to edit only certain cells, here’s how to lock cells in Excel selectively.
The File Is Locked or Someone Else Has It Open
Microsoft’s locked for editing page lists the common causes and fixes:
- Close the file on every device where you have it open. If the message persists, wait a few minutes for the lock to clear.
- If a coworker has it open, wait for them to close it, view it read-only, or ask them to close it.
- For editing at the same time, everyone needs a version that supports co-authoring (Microsoft 365 Excel or Excel for the web), and the file needs to be in OneDrive, OneDrive for Business or SharePoint in Microsoft 365. Excel 2016, 2019 and 2021 LTSC don’t support co-authoring.
- Save the file as .xlsx, .xlsm or .xlsb, and turn off the old Shared Workbook feature, which blocks co-authoring.
More on the setup side: how to let multiple users edit an Excel file.
Excel for the Web Won’t Let You Edit
In the browser, two things usually block editing. If you have view-only access, select Viewing, then Request more access, and ask to edit. If the workbook uses features the browser doesn’t support, Excel for the web offers choices such as Edit a Copy, Open in Desktop or Open in Excel (see the list of unsupported features). Workbooks with macros (VBA) or XML maps may not edit in the browser at all. If you’d rather work offline, you can download a copy of the file and open it in desktop Excel.
Other Things That Block a Single Cell
- Merged cells. A merged block keeps only one value, in its top-left cell, and it can make editing, pasting and sorting behave oddly. Unmerging often makes life easier; here’s how merging and unmerging cells works.
- Data validation. If Excel rejects your entry with a message, the cell probably has a rule that allows only certain values. Check the rule under Data, then Data Validation, or ask the sheet’s owner.
- Spilled formulas. Cells filled by a dynamic array formula (shown with a thin blue border when selected) can’t be typed over individually; edit the formula in the first cell of the range instead.
- Add-ins. If a file stays locked or every workbook misbehaves, an add-in may be the cause. Go to File, Options, Add-Ins, choose Excel Add-ins, click Go, and clear one add-in at a time.
Editing Questions
Why did my entry turn into a date after I pressed Enter?
Excel reads entries like 3-4 or 1/2 as dates in cells with the General format. Format the cell as Text before typing, or type an apostrophe first (for example ‘3-4); the apostrophe doesn’t show in the cell. More on why Excel changes numbers to dates.
Can I edit a cell on a Mac the same way?
Double-clicking the cell and clicking in the formula bar work the same on a Mac. Keyboard shortcuts differ, so check the macOS tab of Microsoft’s Excel keyboard shortcuts page for the key that starts editing.
Does Esc undo a change I’ve already confirmed?
No. Esc only cancels an edit in progress. After Enter, use Ctrl+Z. Excel’s undo list holds up to 100 actions by default and survives a save, but running a macro clears it, so save a copy before you run one on edited data.
How do I stop other people from editing my sheet?
Clear the Locked setting on the cells people should fill in, then protect the sheet; for the whole file, you can also password protect the workbook so it can’t be opened without the password.
If other people will fill in the same file, add a drop-down list to the cells they type in most, so entries stay consistent and there’s less to fix by hand later.

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are checked step by step against the device or app maker’s own documentation and tested on his own devices whenever he has the hardware or software, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.