Bonjour,
Un autre exemple.
ALT F8, exécuter Delete_Rows
Cdlt.
Public Sub Delete_Rows()
Dim lastRow As Long, lastCol As Long, rngData As Range
With Worksheets("Extraction Globale")
If .AutoFilterMode Then .ShowAllData
lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
lastCol = .Cells(6, .Columns.Count).End(xlToLeft).Column
Set rngData = .Cells(6, 1).Resize(lastRow - 5, lastCol)
End With
With rngData
'remplacer 27 par 15 pour la colonne O
.AutoFilter field:=27, Criteria1:=0
.Offset(1).EntireRow.Delete
.AutoFilter
End With
End Sub