Delete Row VBA

Leeh1987

New Member
Joined
Jun 27, 2012
Messages
4
Hi

I have a following workshheet - "Overview"

I am looking for VBA that willdo the following

If cell in the range C10:C70 is empy the delete the whole row

Any ideas would be much appreciated

Cheers
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
Code:
Sub Delete()
Dim i As Long
Application.ScreenUpdating = False
With Sheets("Overview")
    For i = 70 To 10 Step -1
        If .Cells(i, 3) = "" Then .Cells(i, 3).EntireRow.Delete
    Next i
End With
    
Application.ScreenUpdating = True
    
End Sub
 

andrewkard

Active Member
Joined
Apr 6, 2012
Messages
455
Hello, try on the copy of your file:
Code:
Sub test()
    Dim i&
    For i = 70 To 10 Step -1
        If Cells(i, 3).Value = "" Then Rows(i).EntireRow.Delete
    Next i
End Sub
 

bertie

Well-known Member
Joined
Jun 12, 2009
Messages
1,869
Ignore me - I misread and posted a load of rubbish.
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,123,482
Messages
5,601,920
Members
414,482
Latest member
morkar

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
Top