Bonjour Alkacefa17 et le forum,
Une petite rectif au fichier que j'ai joint hier soir.
Modifier le module TRI par ceci :
[Sub Régions()
'
' Indexation par région
' Macro enregistrée le 08/09/05 et rectifiée le 03/10/12 par Henri Le Luron
Range([A6], [Q65536].End(xlUp)).Select
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Add Key:=Range([B6], [B65536].End(xlUp)), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Livre de cave").Sort
.SetRange Range([A5], [Q65536].End(xlUp))
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
End Sub
Sub Millésimes()
'Indexation par Millésimes
Range([A6], [Q65536].End(xlUp)).Select
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Add Key:=Range([C6], [C65536].End(xlUp)), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Livre de cave").Sort
.SetRange Range([A5], [Q65536].End(xlUp))
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
End Sub
Sub Quantité()
'Indexation par Quantité restante
Range([A6], [Q65536].End(xlUp)).Select
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Add Key:=Range([D6], [D65536].End(xlUp)), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Livre de cave").Sort
.SetRange Range([A5], [Q65536].End(xlUp))
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
End Sub
Sub Robe()
'Indexation par Type de vin
Range([A6], [Q65536].End(xlUp)).Select
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Add Key:=Range([A6], [A65536].End(xlUp)), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Livre de cave").Sort
.SetRange Range([A5], [Q65536].End(xlUp))
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
End Sub
Sub Appellation() 'Indexation par Appellation
Range([A6], [Q65536].End(xlUp)).Select
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Livre de cave").Sort.SortFields.Add Key:=Range([E6], [E65536].End(xlUp)), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Livre de cave").Sort
.SetRange Range([A5], [Q65536].End(xlUp))
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
End Sub
Afin de l'adapter à la version excel 2007 et plus.
cdt
Henri