Hi,
I am trying to write a VBA code to combine Columns A+B+C.
Below is the code i am using but receiving Run Time Error 1004 Application Defined or Object Defined error. Can someone please help me with this error.
Thanks
I am trying to write a VBA code to combine Columns A+B+C.
Below is the code i am using but receiving Run Time Error 1004 Application Defined or Object Defined error. Can someone please help me with this error.
Code:
Sub Merge()
Dim R1 As Range
Dim R2 As Range
Dim R3 As Range
Set R1 = Worksheets("Source Data").Range("A2:A" & LastRow)
Set R2 = Worksheets("Source Data").Range("B2:B" & LastRow)
Set R3 = Worksheets("Source Data").Range("C2:C" & LastRow)
Sheets("Source Data").Range("AG2:AG" & LastRow) = "R1" & "R2" & "R3"
End Sub
Thanks
Last edited: