See all How-To Articles

How to Delete Highlighted Cells in Excel & Google Sheets

This tutorial will demonstrate how to delete highlighted cells in Excel and Google Sheets.

 

removehighlightedrows intro

 

You can either delete rows with a specific background color using VBA, or you can filter your Excel worksheet by the color, and then delete the selected rows.

Filter by Color and Delete Selected Rows

Click in the data where the cells / rows that you want to remove are situated.

In the Ribbon, select Home >  Editing > Sort & Filter  >  Filter.

removehighlightedrows filter

OR

Press Ctrl+Shift+L on the keyboard.

Filter drop down lists will appear at the top of each column of data  in the selected data.

removehighlightedrows filter steps

(1) Select one of the drop down lists available in the column headers and then (2) select Filter by Color.  Finally, (3) select the color you wish to filter on – these are the rows you are going to remove.

removehighlightedrows filtered

Select the rows by clicking on the header of the first row to remove, and dragging down to the last row you wish to remove, then, in the Ribbon, select Home > Cells > Delete > Delete Sheet Rows.

removehighlightedrows delete sheet rows

The rows will be removed.  To clear the filter, select the filter dropdown in column that you filtered on, and clear the filter from that column.

removehighlightedrows clear filter

The remaining data will be shown.

removehighlightedrows final

 

Sort by Color and Delete Selected Rows

Click in the data to be sorted, and then, in the Ribbon, select Home > Editing > Sort and Filter > Custom Sort.

removehighlightedrows ribbon sort

 

(1) Remove the check mark from My data has headers and then (2), select the column to sort by.   Amend the Sort On to (3) Cell color and under Order (4) select the color of the cells you wish to remove.

removehighlightedrows customsort

The rows will be sorted to the top of the list.  Select the rows by clicking on the header of the first row to remove, and dragging down to the last row you wish to remove, then, in the Ribbon, select Home > Cells > Delete > Delete Sheet Rows.

removehighlightedrows delete sorted

 

How to Delete Highlighted Cells in Google Sheets

We can also remove highlighted cells in Google Sheets by filtering by color.

In the Data menu, select Create a filter.

removehighlightedrows gs create filter

Then, (1) in the drop down list of one of hte column headers, select (2) Filter by color and then (3) select Fill Color and (4) select the color of the cells you wish to remove.

 

removehighlightedrows gs filter

Select the rows of the filtered data and then (1) in the Edit menu, select (2) Delete and (3) Selected rows.

removehighlightedrows gs delete rows

The filter will automatically be removed and the remaining data will be shown.

removehighlightedrows gs final