Sub Inserer()
Grouper 'RAZ
Dim deb As Range, pas&, ncol%, f$, tablo, ub&, resu(), n&, i&, j&, k%
Set deb = [A5] 'à adapter
pas = 3 'à adapter
ncol = 6 'à adapter
f = deb(1, ncol).FormulaR1C1 'surtout ne pas effacer la formule en F5...
tablo = deb.CurrentRegion.Resize(, ncol)
ub = UBound(tablo)
ReDim resu(1 To ub + 2 * (1 + Int(ub / pas)), 1 To ncol)
n = 1
For i = 1 To ub Step pas
resu(n, ncol) = "<tr>"
For j = 1 To pas
If i + j - 1 > ub Then Exit For
For k = 1 To ncol - 1
resu(n + j, k) = tablo(i + j - 1, k)
Next k
resu(n + j, k) = f
Next j
resu(n + j, ncol) = "</tr>"
n = n + j + 1
Next i
deb.Resize(n - 1, ncol).FormulaR1C1 = resu 'restitution
End Sub
Sub Grouper()
Application.ScreenUpdating = False
On Error Resume Next 'si aucune SpecialCell
With Columns("F")
.Replace "<*>", "#N/A", xlWhole
.SpecialCells(xlCellTypeConstants, 16).EntireRow.Delete
End With
End Sub