1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Sub ConcatenerSurDerniereLigne()
Dim LimiteHor As Long, LimiteVer As Long
Dim i As Integer, j As Integer
Dim Phrase As String
LimiteHor = Cells(1, Columns.Count).End(xlToLeft).Column
Phrase = vbNullString
For i = 1 To LimiteHor
LimiteVer = Cells(Rows.Count, 1).End(xlUp).Row
For j = 1 To LimiteVer
If j <> LimiteVer Then
Phrase = Phrase & Cells(j, i) & ","
Else
Phrase = Phrase & Cells(j, i)
End If
Next j
Cells(j, i) = Phrase
Phrase = vbNullString
Next i
End Sub |