Private Sub Worksheet_Change(ByVal Target As Range)
Dim tablo, resu(), i&, n&, j%, col%
tablo = [B4].CurrentRegion.Resize(, 27) 'matrice, plus rapide
ReDim resu(1 To 2 * UBound(tablo), 1 To 15)
For i = 2 To UBound(tablo)
n = n + 1: resu(n, 2) = tablo(i, 2): resu(n, 3) = tablo(i, 3)
n = n + 1: resu(n, 1) = "taxe": resu(n, 2) = tablo(i, 2): resu(n, 3) = tablo(i, 3)
For j = 4 To 27 Step 2
col = 4 + (j - 4) / 2
resu(n - 1, col) = tablo(i, j)
resu(n, col) = tablo(i, j + 1)
Next j, i
'---restitution---
Application.EnableEvents = False 'désactive les évènements
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [B18] '1ère cellule de restitution, à adapter
If n Then
.Resize(n, 15) = resu
.Resize(n, 15).Borders.Weight = xlThin 'bordures
End If
.Offset(n).Resize(Rows.Count - n - .Row + 1, 15).Delete xlUp 'RAZ eb dessous
End With
With UsedRange: End With 'actualise la barre de défilement verticale
Application.EnableEvents = True 'réactive les évènements
End Sub