Hi there,
I have a macro that walks through each worksheet in a workbook and gets data to collate into another workbook.
I would like to add another worksheet where I will analyze the data that has been collated.
How can I keep the analysis worksheet that I created after the initial macro run from being part of the "For Each ws In Worksheets" example if i run the macro again.
VB snippet. you can see I'm already not including the "Start Here" worksheet, but when I add an AND avoid the analysis worksheet, things don't seem to work very well.
Wondering if anyone knows a better way.
Thank you,
I have a macro that walks through each worksheet in a workbook and gets data to collate into another workbook.
I would like to add another worksheet where I will analyze the data that has been collated.
How can I keep the analysis worksheet that I created after the initial macro run from being part of the "For Each ws In Worksheets" example if i run the macro again.
VB snippet. you can see I'm already not including the "Start Here" worksheet, but when I add an AND avoid the analysis worksheet, things don't seem to work very well.
Wondering if anyone knows a better way.
Thank you,
VBA Code:
For Each ws In Worksheets
If ws.Name <> "Start Here" Then
If ws.UsedRange.Rows.count > maxRow Then
maxRow = ws.UsedRange.Rows.count
Set maxTickerWS = ws
End If
End If
Next