Sub gabungCells()
Dim ColFirst As Long
Dim ColLast As Long
Dim GabungKata As
String
Dim RowCrnt As Long
Dim RowFirst As Long
Dim RowLast As Long
RowFirst = Selection.Row
RowLast = RowFirst +
Selection.Rows.Count - 1
ColFirst =
Selection.Column
ColLast = ColFirst +
Selection.Columns.Count - 1
If ColFirst <> 1 Or ColLast <> 1 Then
Call
MsgBox("Please select a range within column
""A""", vbOKOnly)
Exit
Sub
End If
With
Worksheets("sheet1")
GabungKata
= .Cells(RowFirst, "A").Value
For
RowCrnt = RowFirst + 1 To RowLast
GabungKata
= GabungKata & " " & .Cells(RowCrnt,
"A").Value
Next
Range("b2").Value
= GabungKata
End With
End Sub
trims bang
ReplyDelete