Then all rows with certain cells which are greater or less than a certain value in column D are all filtered out. In the Custom AutoFilter dialog box, enter the certain number after the is greater than or is less than box, and then click the OK button.Ĥ. Click the drop-down arrow in the column you will delete rows based on, then click Number Filters > Greater Than or Less Than as below screenshot:ģ. Select the column header, then click Data > Filter.
In addition to the above two methods, you can filter out all rows with cells greater or less than a certain value in a specified column, and then remove all filtered rows with the Delete Hidden (Visible) Rows & Column utility of Kutools for Excel.īefore applying Kutools for Excel, please download and install it firstly.ġ. And all selected rows are deleted.ģ0-day) of this utility, please click to download it, and then go to apply the operation according above steps. Right click on one of the selected rows, then click Delete from the right-clicking menu. And you can see all rows with value greater than 30000 in column D are selected immediately.Ĥ. Then a dialog box pops up to tell you how many rows are selected, please click the OK button. In the Specific type section, select Greater than or Less than from the first drop-down list, enter the certain value into the next textbox, and then click the OK button.ģ. In the Select Specific Cells dialog box, please select Entire row in the Selection type section. If you want to delete rows if cells are less than a certain value, please change the sign > to Select > Select Specific Cells. Note: In the above code, >30000 means that you will delete rows if cells are greater than 30000 in a specified column. Set xRg = Application.Intersect(xRg, xRg.SpecialCells(xlCellTypeVisible)) MsgBox "You can only select one column per time", vbInformation, "Kutools for Excel"
Set xRg = Application.InputBox("Please select range:", "Kutools for Excel", xTxt,, ,, , 8) VBA code: Delete rows if cell is greater/less than a certain value in Excel Public Sub ProcessData()
Then copy and paste the below VBA code into the Code window. In the Microsoft Visual Basic for Applications window, click Insert > module. Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.Ģ. You can run the following VBA code to achieve it.ġ. Supposing you want to delete entire rows if cell in column D is greater or less than a certain value in Excel. This article will recommend several methods to deal with this problem.ĭelete rows if cell is greater/less than a certain value with VBA codeĭelete rows if cell is greater/less than a certain value with Kutools for Excelĭelete rows if cell is greater/less than a certain value with Kutoos for Excel Sometimes you may need to delete rows if cells in a specified column are greater or less than a certain value in Excel.
How to delete rows if cell is greater/less than a certain value in Excel?