How to Delete Multiple Rows in Excel with Condition

Deleting multiple rows in Excel can be a daunting task, especially when you have a large dataset to work with. However, Excel provides several built-in features that can make this process much easier and less time-consuming. One of these features is the ability to delete multiple rows based on a specific condition, such as deleting all the rows where a particular value is present or where a value meets specific criteria.

In this article, we will provide a step-by-step guide on how to delete multiple rows in Excel with a condition. We will use a sample dataset to demonstrate the process and explain each step in detail. By the end of this article, you should be able to confidently delete multiple rows from your Excel worksheet based on specific conditions, saving you time and improving your data analysis efficiency.

For this article, we will be using the following dataset shown above and we will learn how to delete rows having age less than 25.

Method 1 – Delete Multiple Rows Using Filters

Step 1 – Apply Filters

  • Click anywhere in your table.
  • Go to the Data Tab, under Sort & Filter group, and click on the Filter button.
  • Filters will be applied to your data.

Step 2 – Set Condition For Filter

  • For our example, we will filter out all the ages less than 25.
  • To do so, click on the filter button of the age column.
  •  Move your mouse to Number Filters & select Less Than.

Step 3 – Set Age Filter

  • Custom auto filter screen will appear on your screen.
  • Type 25 & click the OK button.
  • All ages less than 25 will be filtered.

Step 4 – Select Rows

  • Now select filtered rows by dragging your mouse over row numbers.

Step 5 – Delete Rows

  • Right click on any of the selected row numbers & select Delete Row.
  • All the selected rows will be deleted.

Step 6 – Multiple Rows Deleted

  • Multiple rows in your data will be deleted as shown below.

Method 2 – Delete Multiple Rows Using Sort Option

Step 1 – Select Data

  • Select your data.

Step 2 – Go To Sort Option

  • Go to the Data Tab, under Sort & Filter group, click on the Sort button.

Step 3 – Sort Data By Age Column

  • Sort dialog box will appear on your screen.
  • From the sort by column drop down button select Age & select sort order as Smallest to Largest.
  • Click the OK button.

Step 4 – Select Rows

  • The age column will be sorted in the smallest to largest order.
  • Select the rows having an age less than 25 by dragging your mouse over row numbers.

Step 5 – Delete Rows

  • Right click on any of the selected row numbers & select Delete Row.
  • All the selected rows will be deleted.

Step 6 – Rows Deleted

  • Rows with age values less than 25 will be deleted.

Method 3 – Delete Multiple Rows Using Conditional Formatting

Step 1 – Select Age Data

  • Select age data by dragging your mouse or using SHIFT with the downward ARROW key.

Step 2 – Go To Conditional Formatting

  • In the Styles group of the Home Tab, click on the Conditional Formatting button.
  • Move your mouse over Highlight Cells Rules & select Less Than.

Step 3 – Set Less Than Condition

  • Type 25 as the less than condition, for the age column. We will go with the default cell formatting i.e light red fill with dark red text.
  • Click the OK button.
  • Cells having age values less than 25 will be highlighted.

Step 4 – Apply colour Filter

  • Now apply the colour filter on the age column.

Step 5 – Select Rows

  • Select the highlighted rows by dragging your mouse over row numbers.

Step 6 – Delete Rows

  • Right click on any of the selected row numbers & select Delete Row.
  • All the selected rows will be deleted.

Step 7 – Multiple Rows Deleted

  • Multiple rows can be deleted through this method as well.