Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim col%, nlig&, resu(), tablo, i&, nom$, s, ub%, j%, n&, x$, p%
col = Val(Replace(LCase(Sh.Name), "colonne", ""))
If col = 0 Then Exit Sub
col = col + 1
With Sheets("Base").[A1].CurrentRegion
tablo = .Resize(, col) 'matrice, plus rapide
.Columns(col).Name = "Colonne" 'plage nommée
nlig = .Rows.Count + [SUM(LEN(Colonne)-LEN(SUBSTITUTE(Colonne,",",)))]
End With
ReDim resu(1 To nlig, 1 To 2) 'tableau des résultats
For i = 1 To UBound(tablo)
nom = tablo(i, 1)
s = Split(tablo(i, col), ",")
ub = UBound(s)
If ub = -1 Then n = n + 1: resu(n, 1) = nom
For j = 0 To ub
n = n + 1
resu(n, 1) = nom
x = Trim(s(j))
p = InStr(x, ";")
If p Then x = RTrim(Left(x, p - 1)) 'texte avant le point-virgule
resu(n, 2) = x
Next j, i
'---restitution---
With Sh.[A1] '1ère cellule de restitution
.Resize(n, 2) = resu
.Offset(n).Resize(Sh.Rows.Count - n - .Row + 1, 2).ClearContents 'RAZ en dessous
End With
End Sub