bonjour à tous,
j'ai trouvé ce code vba sur un site excel et je cherche à enlever le tri qui est fait sur la colonne de base. Je veux juste un sur-lignage sans le tri. Que dois-je modifier? Merci
--------------------------------
Sub coloriage()
Application.ScreenUpdating = False
[A1].CurrentRegion.Sort Key1:=[A2], Order1:=xlAscending, Header:=xlGuess ' tri
couleur = 36
For i = 2 To [A65000].End(xlUp).Row
If Cells(i, 1) <> Cells(i - 1, 1) Then couleur = IIf(couleur = 36, 34, 36)
Cells(i, 1).Resize(, 2).Interior.ColorIndex = couleur
Next i
Application.ScreenUpdating = True
End Sub
-----------------------------------------------
j'ai trouvé ce code vba sur un site excel et je cherche à enlever le tri qui est fait sur la colonne de base. Je veux juste un sur-lignage sans le tri. Que dois-je modifier? Merci
--------------------------------
Sub coloriage()
Application.ScreenUpdating = False
[A1].CurrentRegion.Sort Key1:=[A2], Order1:=xlAscending, Header:=xlGuess ' tri
couleur = 36
For i = 2 To [A65000].End(xlUp).Row
If Cells(i, 1) <> Cells(i - 1, 1) Then couleur = IIf(couleur = 36, 34, 36)
Cells(i, 1).Resize(, 2).Interior.ColorIndex = couleur
Next i
Application.ScreenUpdating = True
End Sub
-----------------------------------------------