Karnage1210
New Member
- Joined
- Oct 17, 2018
- Messages
- 6
I have some basic VBA code to copy my defined table range (Copy_Data) from one sheet to another. The table updates values based off of Cell A1 on Store Data tab. I have a list of every store number I would need to manually go through and plug into A1 so it can recalculate the table and then copy and compile all the calculations onto the Compile sheet. How can I make it loop through the list of locations I have until it reaches the end? The data should continue to copy and paste at the next available row.
VBA Code:
Sub Copy()
Dim i1 As Integer
i1 = Sheets("Compile").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Store Data").Range("Copy_Data").Copy
Sheets("Compile").Range("A" & i1 + 1).PasteSpecial xlPasteValues
Application.CutCopyMode = False
End Sub