Re : Report donnees planning
Merci néné06,
cela fonctionne très bien sur la page que j'ai simplifié, par contre je n'arrive pas a l’intégrer sur ma page qui contient déjà plusieurs petites macros. car je commande les "AT,MAL,CP.." par bouton et je sélectionne le mois en cours pour réduire ma page
je te met un les quelques macros.merci
Option Explicit
Private Sub AT_Click()
If Selection.Interior.ColorIndex = xlNone Then Selection.Interior.ColorIndex = 9 Else If Selection.Interior.ColorIndex = 9 Then Selection.Interior.ColorIndex = xlNone
ActiveCell.FormulaR1C1 = "AT"
ActiveCell.Offset(0, 1).Select
End Sub
Private Sub CFO_Click()
If Selection.Interior.ColorIndex = xlNone Then Selection.Interior.ColorIndex = 12 Else If Selection.Interior.ColorIndex = 12 Then Selection.Interior.ColorIndex = xlNone
ActiveCell.FormulaR1C1 = "CFO"
ActiveCell.Offset(0, 1).Select
End Sub
Private Sub CMP_Click()
If Selection.Interior.ColorIndex = xlNone Then Selection.Interior.ColorIndex = 7 Else If Selection.Interior.ColorIndex = 7 Then Selection.Interior.ColorIndex = xlNone
ActiveCell.FormulaR1C1 = "CMP"
ActiveCell.Offset(0, 1).Select
End Sub
Private Sub CommandButton10_Click()
UserForm1.Show
End Sub
Private Sub CommandButton11_Click()
If Selection.Interior.ColorIndex = xlNone Then Selection.Interior.ColorIndex = 3 Else If Selection.Interior.ColorIndex = 3 Then Selection.Interior.ColorIndex = xlNone
ActiveCell.FormulaR1C1 = "STD+N"
ActiveCell.Offset(0, 1).Select
End Sub
Private Sub CommandButton15_Click()
If Selection.Interior.ColorIndex = xlNone Then Selection.Interior.ColorIndex = 3 Else If Selection.Interior.ColorIndex = 3 Then Selection.Interior.ColorIndex = xlNone
ActiveCell.FormulaR1C1 = "NUIT"
ActiveCell.Offset(0, 1).Select
End Sub
Private Sub CommandButton2_Click()
If Selection.Interior.ColorIndex = xlNone Then Selection.Interior.ColorIndex = 3 Else If Selection.Interior.ColorIndex = 3 Then Selection.Interior.ColorIndex = xlNone
ActiveCell.FormulaR1C1 = "SAM+N"
ActiveCell.Offset(0, 1).Select
End Sub
Private Sub CP_Click()
If Selection.Interior.ColorIndex = xlNone Then Selection.Interior.ColorIndex = 4 Else If Selection.Interior.ColorIndex = 4 Then Selection.Interior.ColorIndex = xlNone
ActiveCell.FormulaR1C1 = "CP"
ActiveCell.Offset(0, 1).Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$4" Then Exit Sub
Application.ScreenUpdating = False
Columns("B:NB").Hidden = True
Select Case Target
Case "Année complète"
Columns("B:NB").Hidden = False
Case "Janvier"
Columns("B:AF").Hidden = False
Case "Février"
Columns("AG:BH").Hidden = False
Case "Mars"
Columns("BI:CM").Hidden = False
Case "Avril"
Columns("CN
Q").Hidden = False
Case "Mai"
Columns("DR:EV").Hidden = False
Case "Juin"
Columns("EW:FZ").Hidden = False
Case "Juillet"
Columns("GA:HE").Hidden = False
Case "Août"
Columns("HF:IJ").Hidden = False
Case "Septembre"
Columns("IK:JN").Hidden = False
Case "Octobre"
Columns("JO:KS").Hidden = False
Case "Novembre"
Columns("KT:LW").Hidden = False
Case "Décembre"
Columns("LX:NB").Hidden = False
End Select
Application.ScreenUpdating = True
End Sub
Private Sub choix_mois_Click()