0
所以基本上,我想出了合併列A和B的代碼。這看起來可能很愚蠢,但不管我多少次更改X值或單元格數目,我都找不到我的生活如何合併列K和L.Excel VBA合併兩列
這是我做的合併A & B.基本上我想合併名字和姓氏,但他們位於列K和L.隨意告訴如果有更簡單的方法來使用VBA合併列。我是新來的..
Sub MergeColumns()
Dim myText As String, mySpace As String
mySpace = " "
Cells(1, 1) = "AuthorText"
Cells(1, 2) = ""
x = 2
Do While Cells(x, 1) <> ""
Cells(x, 1) = Cells(x, 1) & mySpace & Cells(x, 2)
Cells(x, 2) = ""
x = x + 1
Loop
End Sub