Excel: How to Remove Data, Duplicates, and More

How-to basics · Updated November 18, 2026

In Excel, the right way to remove something depends on what you want gone: press Delete to clear selected cell contents, use Home > Clear for other cell elements, or use a specific command such as Data > Remove Duplicates to remove repeated records. Before deleting rows, columns, or data, check what else depends on it and save a copy if the change may be difficult to reverse.

What “remove” can mean in Excel

Excel uses different actions for different parts of a worksheet. A cell can contain a value, a formula, formatting, a comment, a hyperlink, or some combination of these. Clearing one part does not necessarily remove the others. Deleting a row, by contrast, removes the cells in that row and shifts other cells according to the operation you choose.

It helps to decide what the desired result is before acting. For example, if a cell looks wrong because it has an unwanted fill color, deleting its contents will not fix the appearance. If a record is no longer needed, clearing its values may leave an empty row in the middle of a data table; deleting the worksheet row is usually more appropriate.

  • Clear: remove contents, formats, or other cell elements while keeping the cells in place.
  • Delete cells: remove selected cells and shift surrounding cells up or left.
  • Delete rows or columns: remove entire worksheet rows or columns.
  • Remove Duplicates: keep one instance of a record and remove repeated records from a selected range.

Clear cell contents, formatting, or everything

To remove values or formulas but keep the cells and their formatting, select the cells and press Delete on Windows. On a Mac keyboard, use the Delete key (usually the Backspace key) to clear the selected cell contents. This does not delete the cells themselves, and it does not normally remove their formatting, such as borders, number formats, or fill colors.

For more control, select the cells and choose Home > Editing > Clear. The menu offers separate commands, including Clear Contents, Clear Formats, and Clear All. Clear Contents removes entries but preserves formatting. Clear Formats removes formatting while leaving values and formulas intact. Clear All removes both and other cell elements, so check the selection carefully before using it.

For example, if a column of prices displays as dates because it has the wrong number format, use Clear Formats or apply the correct number format; do not clear the contents unless you intend to erase the prices. Conversely, if you want to reuse a formatted entry area, clearing contents alone can preserve its layout.

Delete cells, rows, and columns

To remove a worksheet row or column rather than merely empty it, select its row number or column letter. Then choose Home > Cells > Delete and select Delete Sheet Rows or Delete Sheet Columns. You can also right-click the selected row or column header and choose Delete. The row or column disappears, and the worksheet closes the gap.

Deleting a smaller block of cells may require a choice about how nearby cells should move. Select the cells, choose Home > Cells > Delete > Delete Cells, and choose whether to shift cells up or left. This is useful for a small, isolated correction, but it can misalign a table if the adjacent columns contain related records. For a structured list, deleting the entire unwanted row is generally safer than deleting only a few cells in that row.

Removing a worksheet is different from deleting its contents. Right-click the sheet tab and choose Delete to remove the sheet. This may also remove formulas or charts that depend on it, and undo may not be available after some subsequent actions. Save a backup first if the sheet contains important information.

Remove duplicate records safely

Excel’s Remove Duplicates command is designed for lists in which a row represents one record. Select a cell in the list or select the data range, then choose Data > Remove Duplicates. In the dialog box, confirm whether the first row contains headers and choose the columns Excel should compare. Click OK to remove matching records from the selected data.

The selected columns define what counts as a duplicate. If you select only an email-address column, rows with the same email are treated as duplicates even if their names or other fields differ. If you select every column, Excel removes rows only when the values match across all selected columns. Excel keeps the first occurrence it finds and removes later matching rows; it does not combine information from the duplicates.

For example, suppose a customer list has name, email, and city columns. If the goal is one record per email address, select the email column as the comparison field, but review the rows first: two people might share an address, or one row may contain more complete details than another. Make a copy of the data before removing duplicates when the choice of which record to keep matters. The command changes the data in place; it is not simply a temporary view.

Remove unwanted text, spaces, and characters

For text that repeats in many cells, Find and Replace can be quicker than editing each entry. Choose Home > Find & Select > Replace, enter the text to find, and leave Replace with blank if you want to remove that text. Use Replace All only after checking the scope: Excel may search the current sheet or a selected range, depending on what is selected and the search settings. A preview using Find Next can help avoid removing a valid part of other words.

Leading or trailing spaces can interfere with matching, sorting, and lookups. If the text to clean is in A2, enter =TRIM(A2) in another cell. For example, if A2 contains “ North Park ” with ordinary spaces, the formula returns “North Park”: it removes leading and trailing spaces and reduces repeated spaces between words to one. Fill the formula down for the other rows. To replace the original text, copy the cleaned results and use Paste Special > Values over the original range, after confirming the results are correct.

TRIM handles ordinary spaces, not every invisible character. Data copied from websites or other systems can include nonbreaking spaces or control characters, which may need a more specific cleanup method. Also distinguish removing characters from changing their appearance: a custom number format can hide digits without deleting the underlying value.

Remove hyperlinks and other unwanted elements

To remove a hyperlink while keeping the displayed text, right-click the linked cell and choose Remove Hyperlink. For a selected range, Excel may offer a Remove Hyperlinks command under Home > Editing > Clear. The exact available context-menu options can depend on the selection. Check a few cells afterward, especially if the range contains a mix of linked and unlinked entries.

Comments and notes are separate from cell contents. In Microsoft 365, a threaded comment can be selected and deleted from the Review tab; a note has its own controls on the Review tab. Removing a comment or note does not erase the cell’s value. If you only want to stop seeing discussion indicators, use the relevant display or review controls rather than deleting the discussion.

Other objects, such as pictures, shapes, and charts, are not ordinary cell contents. Select the object itself and delete it, taking care not to select a neighboring object or worksheet range by mistake. If an object is difficult to select, use Excel’s Selection Pane from the Home tab’s Find & Select menu to locate and manage objects on the sheet.

Check the result and recover from mistakes

After a removal, inspect the affected range and any totals, formulas, charts, or summaries that use it. A deleted row can change the contents of a range; a cleared cell can leave a formula referring to an empty value; and removed duplicates can change counts and totals. Excel may update dependent formulas automatically, but that does not mean the resulting calculation still matches your intended business rule.

For an immediate mistake, use Undo on the Quick Access Toolbar or press Ctrl+Z on Windows. On Mac, use Command+Z. Undo is useful for many recent worksheet changes, but it is not a substitute for a backup: some actions, including running a macro, cannot be undone with Ctrl+Z. If the workbook is important, save a separate copy before broad edits. For especially risky cleanup, work on a duplicate sheet or a copied range and compare the result before replacing the original.

Choose the right removal method

Use the smallest operation that achieves the intended result. That reduces the chance of removing useful information or disrupting the worksheet structure:

  • To erase a value but keep the cell’s appearance, clear contents.
  • To reset appearance but keep the data, clear formats.
  • To remove a record from a table, delete its entire row or use the table’s row-deletion controls.
  • To eliminate repeated records, use Remove Duplicates after choosing comparison columns.
  • To remove a repeated phrase or character, use Replace, then review the matches.
  • To remove a sheet, hyperlink, comment, note, or object, use the command for that specific item.

On Mac, the same general ribbon commands are available in current Excel for Microsoft 365, though keyboard keys and some interface details differ. In Excel for the web, available commands and dialogs can also differ from the Windows desktop version. If a command is missing or arranged differently, use the Search box in Excel to find the feature by name rather than assuming that a desktop shortcut or menu path is identical.

Frequently Asked Questions

How do I remove data from an Excel cell without deleting the cell?
Select the cell or range and press Delete on Windows, or the Delete/Backspace key on Mac. This clears contents while keeping the cells in place. Use Home > Editing > Clear for options that also address formatting.

How do I remove duplicates in Excel but keep the first entry?
Select the list, choose Data > Remove Duplicates, set the header option correctly, and select the columns that define a duplicate. Excel keeps the first matching record it encounters and removes later matches from the selected data.

Why did pressing Delete not remove the formatting?
Delete clears cell contents, not formatting. Select the cells and choose Home > Editing > Clear > Clear Formats to remove formatting while preserving values and formulas.

How do I remove a hyperlink but keep the text?
Right-click the linked cell and choose Remove Hyperlink. The displayed text remains in the cell, but the link is removed.

Can I recover something I removed in Excel?
Try Undo immediately using Ctrl+Z on Windows or Command+Z on Mac. If the change can no longer be undone, check whether the workbook has a saved earlier version or a separate backup; recovery depends on how the file is stored and saved.

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.