I was using select to just make sure that each worksheet ended up at the bottom so that when I tab through for visual validation, it's where it needs to be.
Knew there was probably an easier way to define all of that, but I'm basically a blunt hammer. I think mdmackillop's solution was a little easier for me to understand. I've never used Case Select before.
Would like to verify that I'm making the correct assumption on where to stick the workbook names:
Option Explicit
Sub FillFormulas_1()
Dim r As Range, s As Range, d As Range
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
Select Case Sheets("Data1")
Case Else
Set r = ws.Cells(1, 1).CurrentRegion
Set s = r.Cells(2, 7).End(xlDown).Resize(1, 8)
Set d = s.Cells(1, 1).Offset(1, 0).Resize(r.Rows.Count - s.Row, 8)
s.Copy d
End Select
Select Case Sheets("Data2")
Case Else
Set r = ws.Cells(1, 1).CurrentRegion
Set s = r.Cells(2, 7).End(xlDown).Resize(1, 8)
Set d = s.Cells(1, 1).Offset(1, 0).Resize(r.Rows.Count - s.Row, 8)
s.Copy d
End Select
Select Case Sheets("Data13")
Case Else
Set r = ws.Cells(1, 1).CurrentRegion
Set s = r.Cells(2, 7).End(xlDown).Resize(1, 8)
Set d = s.Cells(1, 1).Offset(1, 0).Resize(r.Rows.Count - s.Row, 8)
s.Copy d
End Select
End Sub
Looking at that - I don't even think that's close to being right... Can you show me where the tab names would go in yours, Paul? There are also 13 pivot table tabs in the workbook, so I wasn't sure about pointing the code at "Each ws in ActiveWorkbook.Worksheets" since I only want to touch the 13 data tabs. This one definitely looked like it was a little more straightforward:
Sub Test()
Dim arr, a
arr = Array("Data1", "Data2", "Data13")
For Each a In arr
Call FillFormulas(a)
Next a
Application.Goto Sheets("RawData-Temp").Range("A1")
End Sub
Sub FillFormulas(Data)
Sheets(a).Select
ActiveCell.SpecialCells(xlLastCell).Select
ActiveCell.EntireRow.Range("A1").Select
Dim a As Range, B As Range, C As Range
Set a = Worksheets(a).Cells(1, 1).CurrentRegion
Set B = a.Cells(2, 7).End(xlDown).Resize(1, 8)
Set C = B.Cells(1, 1).Offset(1, 0).Resize(a.Rows.Count - B.Row, 8)
B.Copy C
End Sub
Thanks to you both for your patience. Babysteps to actually understanding what I'm coding...