回復 1#tr24572411
Sub Ex()
With Sheets("Sheet2")
For i = 1 To .Range("A" & Rows.Count).End(xlUp).Row
' .Cells(i, 6) = Trim(.Cells(i, 1)) = Trim(.Cells(i, 2)) ' 字串中之 Space 無法移除
.Cells(i, 7) = Replace(.Cells(i, 1), " ", "") = Replace(.Cells(i, 2), " ", "")
Next
End With
End Sub作者: 准提部林 時間: 2016-8-29 11:43