Hello,
I noticed that Jon Acampora just uploaded such example.
Hi Dane
Just in case the article by Jon Acampora is too overwhelming (since you are new to VBA/macros) you can give this a try
Sub DelRows()
Dim LastRow As Long
Dim i As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Application.ScreenUpdating = False
For i = LastRow To 1 Step -1
'Count how many values are less than 1
If Application.CountIf(Range("C" & i & ":F" & i), "<1") = 4 Then
'Delete entire row if count is equal to 4
Rows(i).Delete Shift:=xlUp
End If
Next
Application.ScreenUpdating = True
End Sub
Hope this helps.
Sunny
That worked great. Thank you so much Sunny!
No problem.
Just for info, you could also use an autofilter for that:
Sub DelRowsLessThanOne()
Application.ScreenUpdating = False
With Range("A1").CurrentRegion
.AutoFilter field:=3, Criteria1:="<1"
.AutoFilter field:=4, Criteria1:="<1"
.AutoFilter field:=5, Criteria1:="<1"
.AutoFilter field:=6, Criteria1:="<1"
If .Columns(1).SpecialCells(xlCellTypeVisible).Count > 1 Then
.Offset(1).Columns(1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
End If
.AutoFilter
End With
End Sub
that is AWESOME!! you all are the best!
these are going to save me hours of my life
thank you so much