Hi, try this:
Code:
Private Sub CommandButton1_Click()
Dim lastRowIndex As Integer
Dim lastColumnIndex As Integer
Dim rowCounterIndex As Integer
Dim columnCounterIndex As Integer
Dim currentAddress As String
lastRowIndex = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
lastColumnIndex = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Column
For rowCounterIndex = 1 To lastRowIndex
currentAddress = ""
For columnCounterIndex = 1 To lastColumnIndex
If (Len(CStr(ActiveSheet.Cells(rowCounterIndex, columnCounterIndex))) > 0) Then
currentAddress = currentAddress & CStr(ActiveSheet.Cells(rowCounterIndex, columnCounterIndex))
currentAddress = currentAddress & Chr(10)
End If
Next columnCounterIndex
ActiveSheet.Cells(rowCounterIndex, CInt(lastColumnIndex + 1)) = currentAddress
Next rowCounterIndex
End Sub