Bonsoir,
peut-être un peu plus rapide avec ce code :
Sub supp_ligne_zero()
With Range("B1:B" & [B65536].End(xlUp).Row)
.Replace What:="0", Replacement:="", LookAt:=xlWhole
.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End With
End Sub
si les valeurs de la colonne B sont des valeurs entrées manuellement ou via importation
et ce code :
Sub supp_ligne_zero_formule()
Application.ScreenUpdating = False
Columns("B:B").Insert Shift:=xlToRight
Range("B1:B" & [C65536].End(xlUp).Row).Value = Range("C1:C" & [C65536].End(xlUp).Row).Value
With Range("B1:B" & [B65536].End(xlUp).Row)
.Replace What:="0", Replacement:="", LookAt:=xlWhole
.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End With
Columns("B:B").Delete Shift:=xlToLeft
Application.ScreenUpdating = True
End Sub
si les valeurs sont issues de formules