urbanito1
XLDnaute Occasionnel
Salut à la communauté,
j'ai enregistré la macro du fichier joint -
elle fonctionne
j'ai voulu lui ajoindre ce code
( finalisé par Boisgontier )http://www.excel-downloads.com/forum/178704-macro-suppression-de-ligne-avec-une-cellule-contenant-84511-11101-03-a.html
Sub supLignesRapide2()
Application.ScreenUpdating = False
a = Range("W1:W" & [W65000].End(xlUp).Row)
For i = LBound(a) To UBound(a)
If a(i, 1) Like "*84511/11101-03*" Or _
a(i, 1) Like "*84511/11102-03*" Or a(i, 1) Like "*84511/11105-03*" Then a(i, 1) = "sup" Else a(i, 1) = 0
Next i
Columns("b:b").Insert Shift:=xlToRight
[B1].Resize(UBound(a)) = a
[A1].CurrentRegion.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess
On Error Resume Next
Range("B1:B65000").SpecialCells(xlCellTypeConstants, 2).EntireRow.Delete
Columns("b:b").Delete Shift:=xlToLeft
End Sub
je ne dois pas le faire correctement, il m'affiche code anomalie 1004...certainement mon manque d'expérience
qui pourrait voir le problème ? avec un petit mot d'explication
un grand merci
urbanito1
j'ai enregistré la macro du fichier joint -
elle fonctionne
j'ai voulu lui ajoindre ce code
( finalisé par Boisgontier )http://www.excel-downloads.com/forum/178704-macro-suppression-de-ligne-avec-une-cellule-contenant-84511-11101-03-a.html
Sub supLignesRapide2()
Application.ScreenUpdating = False
a = Range("W1:W" & [W65000].End(xlUp).Row)
For i = LBound(a) To UBound(a)
If a(i, 1) Like "*84511/11101-03*" Or _
a(i, 1) Like "*84511/11102-03*" Or a(i, 1) Like "*84511/11105-03*" Then a(i, 1) = "sup" Else a(i, 1) = 0
Next i
Columns("b:b").Insert Shift:=xlToRight
[B1].Resize(UBound(a)) = a
[A1].CurrentRegion.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess
On Error Resume Next
Range("B1:B65000").SpecialCells(xlCellTypeConstants, 2).EntireRow.Delete
Columns("b:b").Delete Shift:=xlToLeft
End Sub
je ne dois pas le faire correctement, il m'affiche code anomalie 1004...certainement mon manque d'expérience
qui pourrait voir le problème ? avec un petit mot d'explication
un grand merci
urbanito1