Merge two columns using excel macro
Closed
new2macros
Posts
3
Registration date
Tuesday 19 May 2015
Status
Member
Last seen
19 May 2015
-
19 May 2015 à 12:06
new2macros Posts 3 Registration date Tuesday 19 May 2015 Status Member Last seen 19 May 2015 - 19 May 2015 à 14:50
new2macros Posts 3 Registration date Tuesday 19 May 2015 Status Member Last seen 19 May 2015 - 19 May 2015 à 14:50
Related:
- Merge two columns using excel macro
- How to merge and compare two excel files - Guide
- Merge twitter accounts - Guide
- Excel mod apk for pc - Download - Spreadsheets
- Excel online macros - Guide
- Excel column number - Guide
1 response
new2macros
Posts
3
Registration date
Tuesday 19 May 2015
Status
Member
Last seen
19 May 2015
19 May 2015 à 12:41
19 May 2015 à 12:41
Below is the code I used:
Sub Concat()
Dim lRow As Long
lRow = Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To lRow
Cells(i, 13) = "(" & Cells(i, 2) & ")" & " " & Cells(i, 3)
Next i
End Sub
The code works partially. The formatting for the new column needs to be applied. I have no idea of doing that.
I also need to delete the columns A and B.
Can someone please have a look at it?
Thanks
Sub Concat()
Dim lRow As Long
lRow = Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To lRow
Cells(i, 13) = "(" & Cells(i, 2) & ")" & " " & Cells(i, 3)
Next i
End Sub
The code works partially. The formatting for the new column needs to be applied. I have no idea of doing that.
I also need to delete the columns A and B.
Can someone please have a look at it?
Thanks
19 May 2015 à 14:50