Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [G:G,J1:J2]) Is Nothing Then Exit Sub
Dim deb As Variant, h&
Application.ScreenUpdating = False
If FilterMode Then ShowAllData 'si la feuille est filtrée
Range("B2:B" & Rows.Count) = "" 'RAZ
deb = Application.Match([J1], [A:A], 0)
If IsError(deb) Or Val(CStr([J2])) < 1 Then Exit Sub
h = Range("G" & Rows.Count).End(xlUp).Row
ThisWorkbook.Names.Add "deb", deb: ThisWorkbook.Names.Add "h", h 'noms définis
With Range("B" & deb).Resize([J2])
.Formula = "=OFFSET(G$1,MOD(ROW()-deb,h),)"
.Value = .Value 'supprime les formules
End With
End Sub