Hello,
I am keenly looking to learn few things and tweak the below macro.
1. How to add new worksheet "Report"? If it already exist then do nothing
2. How to Loop through all the Sheets Except the Sheet "Report"
3. Suggest any other tweaks If I missed to learn
"For i = 1 To Sheets.Count - 1" This line seems to be incorrect. If I Move the "Report" Sheet from Last to First then The macro becomes messy.
Private Sub Workbook_Open()
'Declare nextblank row
Dim Nextblankrow As Long, i As Long
'CleareContents of Report Sheet
Sheets("Report").Cells.ClearContents
'Loop Through Sheets & Copy Data to reports Sheet
For i = 1 To Sheets.Count - 1
'Identify Lastrow
Nextblankrow = Sheets("Report").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
Sheets(i).Range("A2:A11").Copy
Sheets("Report").Cells(Nextblankrow, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Next i
End Sub
Thank you.
Bookmarks