Which is Fast way to delete Blank and Zero values, records entire Rows?

Guna13

Board Regular
Joined
Nov 22, 2019
Messages
70
Office Version
  1. 365
Platform
  1. Windows
Hi Team,

In a specific sheet I have over 10000 records, and I need to delete "Blank" data in the "B" column, then delete entire rows the same way I delete "0" values.

Can you suggest any other method or VBA code to delete fast for this code? It takes a little bit of time to delete.


VBA Code:
Trg.Columns("B").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
    Trg.AutoFilterMode = False

Trg.Range("A1:B1000").AutoFilter Field:=2, Criteria1:="0"
  
  '2. Delete Rows
    Trg.Range("B2:B1000").SpecialCells(xlCellTypeVisible).Delete
  
  
  '3. Clear Filter
  On Error Resume Next
    Trg.AutoFilterMode = False
  On Error GoTo 0
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,216,129
Messages
6,129,047
Members
449,482
Latest member
al mugheen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top