Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Fin: If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [E4:E6]) Is Nothing Then
Dim De, A, i
Application.ScreenUpdating = False
De = [E4]: A = [E6]: Début = 0: Fin = 0
tablo = Range("A2:A" & Range("A65500").End(xlUp).Row)
For i = 1 To UBound(tablo)
If Year(tablo(i, 1)) + 1 = De And Début = 0 Then Début = i + 1
If Year(tablo(i, 1)) = A And Fin = 0 Then Fin = i + 1
If Début <> 0 And Fin <> 0 Then Exit For
Next i
ActiveSheet.ChartObjects("Graphique 1").Activate
ActiveChart.SetSourceData Source:=Range("" & "'Data'!$A$" & Début & ":$B$" & Fin & "")
End If
Fin:
End Sub