This is similar to the other one
Put your cursor on a VBA term and hit F1 to get some online help.
Try .CurrentRegion for example
Option Explicit
Sub DeleteOver4000()
Dim i As Long, iLast As Long, j As Long
Dim r As Range
Application.ScreenUpdating = False
With Worksheets("Data")
iLast = .Cells(1, .Columns.Count).End(xlToLeft).Column
For i = 1 To iLast Step 5
Set r = .Cells(1, i).CurrentRegion
'important to go bottomn to top (that's the Step -1) when deleting
For j = r.Rows.Count To 1 Step -1
If r.Cells(j, 4) > 4000 Then r.Rows(j).Delete Shift:=xlUp
Next j
Next i
End With
Application.ScreenUpdating = True
End Sub