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
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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
 
Upvote 0
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
 
Upvote 0
Ignore me - I misread and posted a load of rubbish.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,237
Members
448,555
Latest member
RobertJones1986

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