Bonjour,
@ doz : Une nouvelle proposition à étudier (plus complète).
@ tulipe_4 : Tes commentaires constructifs sont toujours appréciés.
Cdlt.
Public Sub DeleteRowsInRange2()
Dim lCol As Long, lastRow As Long, lastCol As Long, rngData As Range, rngFilter As Range
Application.ScreenUpdating = False
With ActiveSheet
.AutoFilterMode = False
If .FilterMode = True Then
.ShowAllData
End If
lastCol = .Cells(1, .Columns.Count).End(xlToLeft).Column
lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
Set rngData = .Cells(1).Resize(lastRow, lastCol)
End With
For lCol = 4 To lastCol
rngData.AutoFilter field:=lCol, Criteria1:="="
Next
On Error Resume Next
Set rngFilter = rngData.Offset(1, 0).Resize(rngData.Rows.Count - 1, lastCol).SpecialCells(xlCellTypeVisible)
On Error GoTo 0
If Not rngFilter Is Nothing Then
Application.DisplayAlerts = False
rngFilter.Rows.Delete
End If
ActiveSheet.ShowAllData
End Sub