Bonjour à toutes et à tous 🙂
J'ai fait un code pour faire mes tris, mais il est très long.
	
	
	
	
	
		
Voilà le responsable (enfin, je pense) :
For i = 6 To Range("J" & Rows.Count).End(xlUp).Row
If Cells(i, 10) = "NPR" Or Cells(i, 10) = "RdV Fait" Then Rows(i).Hidden = True
'If Cells(i, 10) = "NPR" Or Cells(i, 10) = "RdV Fait" Then Rows(i).RowHeight = 55
Next i
J'ai tenté les 2 codes ".Hidden = True" et ".RowHeight = 55" = même temps d'exécution (+ de 15 secondes)
Mon fichier que je ne peux pas joindre contient environ 60.000 lignes.
Je ne vois pas comment faire 😡
Auriez-vous la solution pour accélérer le code ?
Je continue à chercher ...
Je vous remercie,
Amicalement,
lionel,
	
		
			
		
		
	
				
			J'ai fait un code pour faire mes tris, mais il est très long.
		VB:
	
	
	Sub tri_RdVs_alpha()
Application.EnableEvents = False
ActiveSheet.Unprotect Password:=""
Range([a6], Cells(Rows.Count, "a").End(xlUp)).RowHeight = 55
    With ActiveSheet 'Feuil3 'CodeName
    If .FilterMode Then .ShowAllData 'si la feuille est filtrée
    With .Rows("6:" & .Range("a65536").End(xlUp).Row)
        If .Row < 6 Then Exit Sub 'sécurité
        .Sort .Columns(1), xlAscending, Header:=xlNo
    End With
   
    For i = 6 To Range("J" & Rows.Count).End(xlUp).Row
    If Cells(i, 10) = "NPR" Or Cells(i, 10) = "RdV Fait" Then Rows(i).Hidden = True
    'If Cells(i, 10) = "NPR" Or Cells(i, 10) = "RdV Fait" Then Rows(i).RowHeight = 55
    Next i
End With
[a3].Select
ActiveSheet.Protect Password:="", DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.EnableEvents = True
End Sub
	For i = 6 To Range("J" & Rows.Count).End(xlUp).Row
If Cells(i, 10) = "NPR" Or Cells(i, 10) = "RdV Fait" Then Rows(i).Hidden = True
'If Cells(i, 10) = "NPR" Or Cells(i, 10) = "RdV Fait" Then Rows(i).RowHeight = 55
Next i
J'ai tenté les 2 codes ".Hidden = True" et ".RowHeight = 55" = même temps d'exécution (+ de 15 secondes)
Mon fichier que je ne peux pas joindre contient environ 60.000 lignes.
Je ne vois pas comment faire 😡
Auriez-vous la solution pour accélérer le code ?
Je continue à chercher ...
Je vous remercie,
Amicalement,
lionel,