VBA_Concatenate Rows.xlsm
Hi I have a spread sheet that with the aid of a button concatenates the first columns (A:C) into column D using the following formula:
Sub Concatenate()
Dim lrow As Long
lrow = Range("A" & Rows.Count).End(xlUp).Row
Range("D1:D" & lrow).FormulaR1C1 = "=(""(""&""'""&RC[-3]&""'""&""""&"")""&"","")&(""(""&""'""&RC[-2]&""'""&""""&"")""&"","")&(""(""&""'""&RC[-1]&""'""&""""&"")""&"","")"
Range("D1:D6").Select
Selection.Clear
Range("D7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
End Sub
The final step I need the macro to do is to remove the last comma (,) from the last cell in column D.
The length of data can vary from day to do. so its not always the same cell.
If anyone can help, cheers.
Dave
Bookmarks