Sub Series()
Dim nlig&, tablo, dest As Range, col%, a(), n&, lig&, nmax&
With [A3:E22] ' tableau source, à adapter
nlig = .Rows.Count
tablo = .Resize(nlig + 1) '1 ligne de plus
End With
Set dest = [G3] 'à adapter
For col = 1 To UBound(tablo, 2)
ReDim a(1 To nlig, 1 To 1)
n = 0
For lig = 1 To nlig
If tablo(lig, col) <> "" And tablo(lig + 1, col) = tablo(lig, col) + 1 Then
n = n + 1
a(n, 1) = tablo(lig, col)
ElseIf n Then
If a(n, 1) <> "" Then
n = n + 1
If tablo(lig, col) = a(n - 1, 1) + 1 Then a(n, 1) = tablo(lig, col): If n > nmax Then nmax = n
End If
End If
Next lig
dest(1, col).Resize(nlig) = a
Next col
dest.Resize(nlig, col - 1).Borders.LineStyle = xlNone 'RAZ des bordures
If nmax Then dest.Resize(nmax, col - 1).Borders.Weight = xlThin
End Sub