Hello,
I recorded a macro that works perfectly, but is rather lengthy and I feel there is a shorter version that can be created. Also I would like to merge this with another macro that is currently the second step in my process.
I currently create a pivot table on a second sheet called "scorecard" from data on sheet 1 then I recorded this process.
Sub CreateSheet()
'
' CreateSheet Macro
'
'
Range("B3").Select
Selection.ShowDetail = True
Sheets("Scorecard").Select
Range("B4").Select
Selection.ShowDetail = True
Sheets("Scorecard").Select
Range("B5").Select
Selection.ShowDetail = True
Sheets("Scorecard").Select
ETC...
<tbody>
</tbody><colgroup><col></colgroup>
Is there a way to shorten this to go ahead and click "B3,B4,B5, etc..... until it reaches an empty cell as I sometimes can have as many as 2000 or more sheets to create...?
And if possible can I combine the new macro with this one...?
This Macro obviously renames the new spreadsheets to my customers name in "B2".
Sub RenameTabs()
For i = 1 To Sheets.Count
If Worksheets(i).Range("B2").Value <> "" Then
Sheets(i).Name = Worksheets(i).Range("B2").Value
End If
Next
End Sub
Thanks in advance...
Gary
I recorded a macro that works perfectly, but is rather lengthy and I feel there is a shorter version that can be created. Also I would like to merge this with another macro that is currently the second step in my process.
I currently create a pivot table on a second sheet called "scorecard" from data on sheet 1 then I recorded this process.
Sub CreateSheet()
'
' CreateSheet Macro
'
'
Range("B3").Select
Selection.ShowDetail = True
Sheets("Scorecard").Select
Range("B4").Select
Selection.ShowDetail = True
Sheets("Scorecard").Select
Range("B5").Select
Selection.ShowDetail = True
Sheets("Scorecard").Select
ETC...
Range("B399").Select |
Selection.ShowDetail = True |
Sheets("Scorecard").Select |
Range("B400").Select |
Selection.ShowDetail = True |
Sheets("Scorecard").Select |
End Sub |
<tbody>
</tbody><colgroup><col></colgroup>
Is there a way to shorten this to go ahead and click "B3,B4,B5, etc..... until it reaches an empty cell as I sometimes can have as many as 2000 or more sheets to create...?
And if possible can I combine the new macro with this one...?
This Macro obviously renames the new spreadsheets to my customers name in "B2".
Sub RenameTabs()
For i = 1 To Sheets.Count
If Worksheets(i).Range("B2").Value <> "" Then
Sheets(i).Name = Worksheets(i).Range("B2").Value
End If
Next
End Sub
Thanks in advance...
Gary