VBABeginner1
New Member
- Joined
- Dec 6, 2014
- Messages
- 31
Code:
Sub Concate()
Dim i As Long
Dim c As String
Dim WS1 As Worksheet
Dim WS2 As Worksheet
Set WS1 = Worksheets("BEFORE AND AFTER")
Set WS2 = Worksheets("COMPARE")
For i = 4 To 10004
WS2.Cells(i, 123) = WS1.Cells(i, 188) & " " & WS1.Cells(i, 189)
c = RTrim(WS2.Cells(i, 123))
Next i
Whenever I run this, it still has the trailing space to the right. I am doing this to correct the problem if the 2nd cell in the concatenate is blank....... (WS1.cells(i, 189) in this example.