Option Base 1
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [A:AY]) Is Nothing Then Exit Sub 'test définissant LA ZONE CONCERNEE
Dim derlig As Long, tablo, tablotest, tablofinal(), i As Long, n As Long
derlig = Columns("A").Find("?*", LookIn:=xlValues, SearchDirection:=xlPrevious).Row 'dernière ligne en colonne A où la valeur est <> ""
tablo = Range("B7:D" & derlig).Value2 'plage des données à copier - Value 2 à cause des dates
tablotest = Range("AY7:AY" & derlig) 'plage à tester
For i = 1 To UBound(tablotest)
If tablotest(i, 1) < 10 Then
n = n + 1 'compte les lignes copiées
ReDim Preserve tablofinal(3, n) 'tableau de restitution évolutif (seule la 2ème dimension peut évoluer)
tablofinal(1, n) = tablo(i, 1): tablofinal(2, n) = tablo(i, 2): tablofinal(3, n) = tablo(i, 3) 'remplissage du tableau de restitution
End If
Next
With Sheets("ACCUEIL")
.Range("L7:N65536").ClearContents 'vide la plage de restitution
.Range("L7").Resize(n, 3) = Application.Transpose(tablofinal) 'copie le tableau de restitution
End With
End Sub