Somebody very kindly coded me the macro below to copy a portion of a table defined by a cell reference (E1)
Sub copy()
Dim YouLikeToPasteTo As String
YouLikeToPasteTo = "A1"
Sheets("Sheet1").Range("A2:C" & _
1 + Sheets("Sheet1").Range("E1").Value).copy
With Sheets("Sheet2")
With .Range(YouLikeToPasteTo)
.PasteSpecial (xlPasteValues)
End With
End With
Application.CutCopyMode = False
End Sub
I need to try and utilise this to copy data from a number of different tables on sheet1 and consolidate them into a table on sheet2 but I’m having a little trouble, I’m assuming it will be a case of altering the following
To function as:
YouLikeToPasteTo = "A” + (“Sheet1”).Range(“J1”).Value.copy
But not exactly sure how to express this in VBA?
Attachment 256073
Bookmarks