Evelynetfrancois
XLDnaute Impliqué
bonjour à tous
j'utilise , grace a ce forum bien sur !!, cette macro ci dessous .
Elle fonctionne tres bien , et correspond parfaitement à mon attente
mais elle est particulierement longue à s 'executer.......................
voyez vous une correction à y apporter pour l'activer un peu ?
je vous remercie d avance pour le temps que vous pourriez me consacrer, et toutes vos aides si precieuses .
bonne journée à tous
E et F
_______________________________________________________
Private Sub OptionButton1_Click()
Dim cell As Range
Dim depart As String
Dim vide As Integer
Application.ScreenUpdating = False
Range("D2").Select
Selection.Interior.ColorIndex = 3
Range("E2").Select
Selection.Interior.ColorIndex = 47
Range("F2").Select
Selection.Interior.ColorIndex = 47
With Selection
.AutoFilter Field:=1
.AutoFilter Field:=2
.AutoFilter Field:=3
.AutoFilter Field:=4
.AutoFilter Field:=5
.AutoFilter Field:=6
End With
Range("A4:F600").Select
Selection.Sort Key1:=Range("F4"), Order1:=xlAscending, Key2:=Range("E4" _
), Order2:=xlAscending, Key3:=Range("B4"), Order3:=xlAscending, Header _
:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom _
, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
xlSortNormal
vide = 3
depart = Range("B3").Value
For Each cell In Range("a4", Range("A65536").End(xlUp).Offset(1, 0))
If Rows(cell.Row).Hidden = False Then
If Not cell.Value = depart Then
Rows(cell.Row).Insert Shift:=xlDown
If cell.Row > 5 Then
Range("D" & cell.Row - 1).Formula = "=SUM(D" & vide & "😀" & cell.Row - 2 & ")"
Range("D" & cell.Row - 1).Interior.ColorIndex = 6
End If
vide = cell.Row
depart = cell.Value
End If
End If
Next
Application.ScreenUpdating = True
Range("A4").Select
Unload Me
End Sub
j'utilise , grace a ce forum bien sur !!, cette macro ci dessous .
Elle fonctionne tres bien , et correspond parfaitement à mon attente
mais elle est particulierement longue à s 'executer.......................
voyez vous une correction à y apporter pour l'activer un peu ?
je vous remercie d avance pour le temps que vous pourriez me consacrer, et toutes vos aides si precieuses .
bonne journée à tous
E et F
_______________________________________________________
Private Sub OptionButton1_Click()
Dim cell As Range
Dim depart As String
Dim vide As Integer
Application.ScreenUpdating = False
Range("D2").Select
Selection.Interior.ColorIndex = 3
Range("E2").Select
Selection.Interior.ColorIndex = 47
Range("F2").Select
Selection.Interior.ColorIndex = 47
With Selection
.AutoFilter Field:=1
.AutoFilter Field:=2
.AutoFilter Field:=3
.AutoFilter Field:=4
.AutoFilter Field:=5
.AutoFilter Field:=6
End With
Range("A4:F600").Select
Selection.Sort Key1:=Range("F4"), Order1:=xlAscending, Key2:=Range("E4" _
), Order2:=xlAscending, Key3:=Range("B4"), Order3:=xlAscending, Header _
:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom _
, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
xlSortNormal
vide = 3
depart = Range("B3").Value
For Each cell In Range("a4", Range("A65536").End(xlUp).Offset(1, 0))
If Rows(cell.Row).Hidden = False Then
If Not cell.Value = depart Then
Rows(cell.Row).Insert Shift:=xlDown
If cell.Row > 5 Then
Range("D" & cell.Row - 1).Formula = "=SUM(D" & vide & "😀" & cell.Row - 2 & ")"
Range("D" & cell.Row - 1).Interior.ColorIndex = 6
End If
vide = cell.Row
depart = cell.Value
End If
End If
Next
Application.ScreenUpdating = True
Range("A4").Select
Unload Me
End Sub