Application d'une macro tri horizontal

bonjour

je souhaiteri effectuer un tri horizontale, jai trouvé cette macro ci dessous mais je n'arrive pas à l'appliquer, quelqu'un pourrait il maider à l'appliquer et à la ecrypter

merci d'avance

Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Cells(1, 1)) Is Nothing Then

Columns.Hidden = False

If Target.Value = "" Then Exit Sub

For i = Cells(2, Columns.Count).End(xlToLeft).Column To 2 Step -1

Debug.Print Cells(2, i).Address

If Cells(2, i).Value <> Target.Value Then Columns(i).Hidden = True

Next i

End If

End Sub

44plan-avec-tri.xlsx (8.58 Ko)

Bonjour

Tu parles d'un tri horizontal

Où sont les données à trier ?

Ta macro (sans trop chercher) sert à masquer des colonnes, je ne vois pas le rapport entre tri et masquage

Rechercher des sujets similaires à "application macro tri horizontal"