Scan Range of Cells for 0

  • Thread starter Thread starter Legacy 185509
  • Start date Start date
L

Legacy 185509

Guest
Hi
I need to Scan Certain Range of Cell in Column for 0
if it is 0 than delete the whole row
please help me do this you will save my life
thank you
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You use an Autofilter, and filter on the value 0.

Select the cells it returns, and delete the rows.
 
Upvote 0
I cannot do that,
I want to make macro of it
if i use autofilter my whole current macro will go use less
 
Upvote 0
For instance, if the 0's are in column A and your sheet is set up well:

Code:
    With Sheets("NameOfTheSheet").UsedRange
        .AutoFilter 1, 0
        .Offset(1).EntireRow.Delete
        .AutoFilter
    End With

You should provide the name of the sheet where I indicated: Sheets("NameOfTheSheet")
Or, you could use ActiveSheet instead.

Wigi
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,716
Members
452,939
Latest member
WCrawford

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