1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
'APPLIQUE UN FILTRE AUTO A 2ème Ligne titre
'Triage feuille référence
Sheets("Référence").Select
Selection.AutoFilter
Columns("A:A").Select
'Cherche la cellule avec "Division"
Columns("A:A").Cells.Find(What:="Division", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
True).Activate
Cells.FindNext(After:=ActiveCell).Activate
'rends active la ligne de la cellule
Rows(ActiveCell.Row).Select
'place le filtre
Selection.AutoFilter
'APPLIQUE UN TRIAGE A LA CATEGORIE COMPOSANTE
'Sélection colonne'
Columns("E:E").Select
'Recherche catégorie 'N° Composante'
Cells.Find(What:="N° composante", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=True, SearchFormat:=False).Activate
Set Triage = Cells.FindNext(After:=ActiveCell).Activate 'Donne un nom à la 2ème cellule ayant pour nom 'N° Composante
' Applique un filtre, triage par ordre croissant de la 2ème cellule 'N° Composante' jusqu'à la dernière ligne
Range("A34:I1598").Sort Key1:=Range("Triage"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers |
Partager