Bonjour,
Ce que j'essaye de faire c'est de trier mon tableau selon les valeurs des pays de l'annee courante cad il doit selectiner l'annee 2016 et trier les valeurs des pays par ordre descendant
2014 2015 2016 2017 FR 0 5 22 1 AT 0 6 3 0 AU 0 0 14 0 BE 0 4 3 0 BG 0 5 0 0 BY 0 0 0 0 CA 0 0 1 0 CH 0 0 10 0 CY 0 0 0 0 CZ 1 11 30 0 DE 0 12 0 0 DK 0 0 20 0 EE 0 2 1 0 EL 0 3 18 0 ES 0 8 13 0 EU 0 0 14 0
J ai fait ce code mais ca marche pas, Est ce que vous pourrez m'aider?
Code VBA : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 If (CurCell.Value = Year(Now())) = True Then Range("D327:D375").Select ActiveWorkbook.Worksheets("Ratios").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Ratios").Sort.SortFields.Add Key:=Range( _ "D328:D375"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _ xlSortNormal With ActiveWorkbook.Worksheets("Ratios").Sort .SetRange Range("D327:D375") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With
Partager