PASCAL84810
XLDnaute Junior
Bonjour,
j'ai repris et adapté une macro faite par un ancien collégue de travail, pour suprimer entierement une ligne suivant des conditions sur le texte d'une cellule mais j'ai 225000 Lignes à traiter et c'est super long. j'ai parcouru le site sur le sujet et fait des essais avec des macros proposé, mais je n'ai rien trouvé de concluant, existe-il une solution pour augmenter la rapidité d'exécution ? a part prendre un ordinateur plus puissant .
merci pour vos réponses
Sub suppressionlignegenerique()
Application.ScreenUpdating = False
Sheets("base de donnée").Activate
For i = Cells(1, 1).CurrentRegion.Rows.Count To 1 Step -1
If Cells(i, 1).Value = "TEXTE" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "PDR" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "ALARME" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "BALAI.ASPIRATEUR" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COMPOSANT.ELECT.SAV" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUVERTURE.AUTO" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUVERTURE.HIVER" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUVERTURE.SOLAIRE" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "ELECTROLYSEUR" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVFC" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS1C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS1F" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS2" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS2C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS2F" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS3" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS3C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4F" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "POMPE" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "POMPE.REGUL" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "ROBOT" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "SAV1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "DIVERS" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUTKM1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "PEAGE1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 3) Like "COGAR*" Then Cells(i, 1).EntireRow.Delete
Next
Application.ScreenUpdating = True
End Sub
j'ai repris et adapté une macro faite par un ancien collégue de travail, pour suprimer entierement une ligne suivant des conditions sur le texte d'une cellule mais j'ai 225000 Lignes à traiter et c'est super long. j'ai parcouru le site sur le sujet et fait des essais avec des macros proposé, mais je n'ai rien trouvé de concluant, existe-il une solution pour augmenter la rapidité d'exécution ? a part prendre un ordinateur plus puissant .
merci pour vos réponses
Sub suppressionlignegenerique()
Application.ScreenUpdating = False
Sheets("base de donnée").Activate
For i = Cells(1, 1).CurrentRegion.Rows.Count To 1 Step -1
If Cells(i, 1).Value = "TEXTE" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "PDR" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "ALARME" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "BALAI.ASPIRATEUR" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COMPOSANT.ELECT.SAV" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUVERTURE.AUTO" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUVERTURE.HIVER" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUVERTURE.SOLAIRE" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "ELECTROLYSEUR" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVFC" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS1C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS1F" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS2" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS2C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS2F" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS3" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS3C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4C" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "FSAVS4F" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "POMPE" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "POMPE.REGUL" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "ROBOT" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "SAV1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "DIVERS" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "COUTKM1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 1).Value = "PEAGE1" Then Cells(i, 1).EntireRow.Delete
If Cells(i, 3) Like "COGAR*" Then Cells(i, 1).EntireRow.Delete
Next
Application.ScreenUpdating = True
End Sub