Excel VBA copying a static range into a dynamic range on different sheet

Viewed 1033

I'm having a few issues working this out as I'm new to VBA but I'm sure it has a pretty simple solution.

I'm essentially wanting to automate the addition of new data to a sheet.

Sheet: INB BASKET Cells: A2:I76 contains live links to another worksheet. Basically I want to copy these as Values to Sheet IND TOTAL below the latest entry on a button press (not continually updating).

I've created a dynamic named range (PasteRange) in excel that selects the 75 rows below the last entry that I want to paste into:

=OFFSET('IND TOTAL'!$A$1,COUNTA('IND TOTAL'!$A:$A),0,75,9)

I've then created a module with the following:

Sub CopyRange()
Dim CopyFrom As Range

Set CopyFrom = Sheets("IND BASKET").Range("A2", [I76])
et PasteArea = Sheets("IND TOTAL").Range("PasteRange")

CopyFrom.Copy
PasteArea.PasteSpecial xlPasteValues
End Sub

But to no success as of yet, please advise.

1 Answers
Related