Private Sub Worksheet_Activate()
Dim ncol%, tablo, resu(), i&, j%, n&
With Sheets("Feuil1").[A1].CurrentRegion
ncol = .Columns.Count
If ncol = 1 Then ncol = 2
tablo = .Resize(, ncol) 'matrice, plus rapide
ReDim resu(1 To .Rows.Count * (ncol - 1), 1 To 2)
End With
For i = 2 To UBound(tablo)
For j = 2 To ncol
If tablo(i, j) <> "" Then
n = n + 1
resu(n, 1) = tablo(i, 1)
resu(n, 2) = tablo(i, j)
End If
Next j, i
'---restitution--
If FilterMode Then ShowAllData 'si la feuille est filtrée
With [A2] 'cellule de destination à adapter
If n Then .Resize(n, 2) = resu: _
.Resize(n, 2).Borders.Weight = xlThin 'bordures
.Offset(n).Resize(Rows.Count - n - .Row + 1, 2).Delete xlUp 'RAZ en dessous
End With
Columns.AutoFit 'ajustement largeurs
With UsedRange: End With 'actualise la barre de défilement verticale
End Sub