I have two workbooks the first one is called classeur1 and the second is called classeur2.
I cannot copy / paste merged rows from a table from Sheet1 (from Workbook1) to Sheet2 (from Workbook2).
I would like to know how to do it.
In fact I tried but no result. Here is my code:
Sub test()
Dim finalrow As Long
Workbooks("workbook1").Worksheets("sheet1").Range("D1:D" & finalrow).Value = Workbooks("workbook2").Worksheets("sheet2").Range("A2:A" & finalrow).Value
End Sub
You can try to define the name for your table by selecting the range, and Insert -> Tables -> Table. Let's say the name is "Table1"
One of your ranges starts at D1 and the other at A2 but both go to finalRow. This makes them different size ranges. I'll assume that you have actually assigned a row number to finalRow but I won't use it.