Sub RetrouverLesDonnees()
Dim Janv As Range
Dim Fev As Range
Dim Mar As Range
Dim Tablo As Worksheet
Set Janv = Worksheets("Database").Range("A2:G8")
Set Fev = Worksheets("Database").Range("A9:G15")
Set Mar = Worksheets("Database").Range("A16:G22")
Set Tablo = Worksheets("Tableau")
If Worksheets("Tableau").[B5].Value = "Janvier" Then
Janv.Copy
Tablo.Cells(9, 3).PasteSpecial Paste:=xlPasteValues, Transpose:=True
Application.CutCopyMode = False
End If
If Worksheets("Tableau").[B5].Value = "Février" Then
Fev.Copy
Tablo.Cells(9, 3).PasteSpecial Paste:=xlPasteValues, Transpose:=True
Application.CutCopyMode = False
End If
If Worksheets("Tableau").[B5].Value = "Mars" Then
Mar.Copy
Tablo.Cells(9, 3).PasteSpecial Paste:=xlPasteValues, Transpose:=True
Application.CutCopyMode = False
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target =[COLOR="Red"] [B5][/COLOR] Then Call Feuil1.RetrouverLesDonnees
End Sub