How to Delete Empty Cells in Excel: Step-by-Step Guide
In this article
Deleting empty cells in Excel rearranges your data by removing blank entries and shifting surrounding cells to fill the gaps. This cleans up datasets, prevents errors in formulas or charts, and ensures accurate sorting or filtering. Before you begin, ensure your data is backed up—especially if you’re working with formulas or linked reports—and confirm whether you want to delete *entire rows* containing empty cells or just shift cells *within a column or range*. The method differs significantly based on that choice.
What You'll Need
- A working copy of Microsoft Excel (Windows or Mac)
- The Excel file you want to clean
- Basic understanding of selecting cells and using the ribbon menu
Step-by-Step
- Identify the range: Select the specific cells, column, or row where you want to remove empty entries. Click and drag to highlight the area, or click the column letter (e.g., A) or row number (e.g., 5) to select an entire column or row. If your data spans multiple columns, select only the relevant columns—avoid selecting entire unused sheets to prevent unintended deletions.
- Open the Go To Special dialog: Press Ctrl + G (Windows) or Command + G (Mac) to open the Go To dialog box. Then click the Special… button. If the dialog doesn’t open, ensure no cells are protected or merged in a way that blocks selection.
- Select blanks: In the Go To Special dialog, check the Blanks option only (leave all other checkboxes unchecked). Click OK. Excel will highlight all empty cells within your previous selection.
- Delete the blank cells: With the blank cells still selected, right-click any highlighted cell and choose Delete… from the context menu. Alternatively, go to the Home tab > Cells group > Delete > Delete Cells….
- Choose deletion behavior: A new dialog appears with four options: Shift cells left, Shift cells up, Entire row, and Entire column. For most cleaning tasks in a single column, select Shift cells up to move data from below upward into the now-empty spots. If your data is in a row, choose Shift cells left. Avoid Entire row unless you intend to delete full rows where *any* cell in that row is blank—this is common in datasets where missing values indicate incomplete records.
- Confirm and verify: Click OK. Excel shifts the data and removes the blank cells. Scroll through the range to visually confirm no gaps remain. If you used Shift cells up, ensure no critical data was accidentally overwritten—this method does not overwrite data in adjacent rows unless blanks are adjacent to non-blanks in the same column.
Common Mistakes
- Using Delete Row instead of Delete Cells: Selecting Entire row deletes the whole row, which may remove valid data in other columns. Only use this if *every* column in that row is irrelevant when one cell is blank.
- Missing truly blank cells: Cells containing spaces, line breaks, or invisible characters (e.g., from copied data) appear empty but aren’t flagged by Go To Special > Blanks. To catch these, use Find & Replace: press Ctrl + H, leave Find what blank, but type a space in Find what and replace with nothing—repeat for line breaks using Ctrl + J as the search term.
- Deleting before sorting or filtering: Removing blanks *before* sorting can shift data out of alignment with related columns. Always sort or filter *after* cleaning, or use filters to isolate blanks first.
- Over-selecting ranges: Accidentally selecting the entire sheet (clicking the top-left triangle above row 1 and left of column A) triggers blank deletion across thousands of rows, potentially deleting thousands of empty rows and breaking formulas or charts.
Tips
- Use conditional formatting to preview blanks: Before deleting, highlight potential blanks by selecting your range > Home tab > Conditional Formatting > New Rule > Format only cells that contain > Blanks > set a fill color. This lets you visually verify coverage before deletion.
- Work on a copy first: Save your file under a new name (e.g., Data_Cleaned.xlsx) before running this process. Excel doesn’t warn before shifting data, and mistakes can be irreversible.
- Combine with filtering for precision: Apply an AutoFilter (Data tab > Filter), then filter the target column for (Blanks). Select the visible blank rows, right-click, and choose Delete Row. This deletes full rows only where the *filtered column* is blank, preserving data in other columns.
- Check for formulas returning empty strings: Cells with
=IF(A1="", "", "Data")appear blank but aren’t recognized as blanks by Go To Special. Press Ctrl + ` (grave accent) to toggle formula visibility and identify these. Replace such formulas with static values (copy > Paste Special > Values) before deleting blanks.
Troubleshooting
If empty cells remain after deletion, first verify you selected Blanks in Go To Special and not Constants or Formulas. Next, check if any cells contain spaces or non-printing characters—press Ctrl + A to select all, then use Find & Replace with a space or Ctrl + J to remove them. If Excel refuses to delete, ensure the worksheet isn’t protected: go to Review tab > Protect Sheet and uncheck protection if enabled. If you see a #REF! error after deletion, it means formulas referenced deleted cells; fix by updating formulas to reference the new range or use IFERROR wrappers. If data jumps inconsistently across columns, you likely selected Shift cells left when you needed Shift cells up—revert with Ctrl + Z and retry with the correct shift direction.
Frequently Asked Questions
Can I delete empty cells in multiple columns at once?
Yes—select the multi-column range first, then use Go To Special > Blanks and choose Shift cells up. This shifts data upward in each column independently. Avoid Shift cells left unless all columns are contiguous and you want horizontal shifting.Why do some cells still appear blank after deletion?
They may contain invisible characters like spaces or line breaks. Use Find & Replace with Ctrl + J (for line breaks) or a space character to clean them. Alternatively, apply=TRIM(A1) to clean data first.
Does deleting empty cells affect formulas?
Yes—if other formulas reference the cells being shifted, they may break or return #REF!. Always review formulas after deletion. Use structured references (e.g., Excel Tables via Insert > Table) to minimize this risk, as Excel auto-adjusts table references.Can I delete only truly empty rows (not just cells)?
Yes—select your data range, press Ctrl + G > Special… > check Blanks > OK, then right-click and choose Row under Entire row. This deletes rows where *at least one* selected cell is blank. For stricter “entire row is blank,” use a helper column with=COUNTBLANK(A1:Z1)=COLUMNS(A1:Z1), filter for TRUE, and delete visible rows.