OOps, so sorry, I didn't realize s1 has more columns up to col.BYB...
Hope this works as you wanted.
Sub test()
Dim s1 As Range, s2 As Range, myAreas As Areas, myArea As Range, r As Range
Dim i As Long, ii As Long, iii As Long, iv As Long, v As Long, x, n As Long
Const myStep = 10, myNum = 4
Application.ScreenUpdating = False
Set s1 = Sheets("s1").Cells(1).CurrentRegion
Set s2 = Sheets("s2").Cells(1).CurrentRegion
For i = 1 To s2.Rows.Count
For ii = 2 To s2.Columns.Count
For iii = 1 To s1.Rows.Count
Set myAreas = s1.Rows(iii).EntireRow.Resize(, Columns.Count - 1).Offset(, 1).SpecialCells(2, 1).Areas
For Each myArea In myAreas
x = WorksheetFunction.IfError(Application.Match(s2.Cells(i, ii).Resize(, myStep), myArea, 0), 0)
For iv = 1 To myArea.Count Step myStep
n = 0
For v = 1 To myStep
If (x(v) >= iv) * (x(v) <= iv + myStep) Then n = n + 1
If n > myNum Then
If r Is Nothing Then
Set r = s2.Rows(i)
Else
Set r = Union(r, s2.Rows(i))
End If
Exit For
End If
Next
If n > myNum Then Exit For
Next
If n > myNum Then Exit For
Next
If n > myNum Then Exit For
Next
If n > myNum Then Exit For
Next
Next
If Not r Is Nothing Then
r.EntireRow.Delete
Else
MsgBox "No match"
End If
Application.ScreenUpdating = True
End Sub
Bookmarks