Merge two columns using excel macro
Closed
new2macros
Posts
3
Registration date
Tuesday May 19, 2015
Status
Member
Last seen
May 19, 2015
-
May 19, 2015 at 12:06 PM
new2macros Posts 3 Registration date Tuesday May 19, 2015 Status Member Last seen May 19, 2015 - May 19, 2015 at 02:50 PM
new2macros Posts 3 Registration date Tuesday May 19, 2015 Status Member Last seen May 19, 2015 - May 19, 2015 at 02:50 PM
Related:
- Merge two columns using excel macro
- Spell number in excel without macro - Guide
- Macro excel download - Download - Spreadsheets
- Excel date format dd.mm.yyyy - Guide
- Display two columns in data validation list but return only one - Guide
- Excel free download - Download - Spreadsheets
1 response
new2macros
Posts
3
Registration date
Tuesday May 19, 2015
Status
Member
Last seen
May 19, 2015
May 19, 2015 at 12:41 PM
May 19, 2015 at 12:41 PM
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
May 19, 2015 at 02:50 PM