Sub CopyRow_Log_MultiSheet()
Dim lRow As Long
Dim wsMstr As Worksheet, ws As Worksheet
'Set wsMstr = Worksheets("Master") ' <-- Change as required
Set wsMstr = ActiveSheet ' <-- You can use this if your button is on the master sheet
With wsMstr
lRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
.Select ' Select first sheet to be grouped
End With
For Each ws In Worksheets
If Left(ws.Name, 5) = "CA YR" Then ' Assumes the target sheets start with CA YR
ws.Select Replace:=False
End If
Next ws
Rows(lRow - 1).Copy ' Copy row 1 row above the total row
Rows(lRow - 1).Insert Shift:=xlDown ' Insert above the last data row so the Total will include all data rows
Rows(lRow).SpecialCells(xlCellTypeConstants, 23).ClearContents
End Sub