LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Macro to stop at a certain tab and does not go to the next one.

I have this macro . This calculates the formuals and copis it to all
the 50 tabs in the workbook, but I want to stop it at the 50th tab
because the 51th tab is the master data that i dont want to touch. here
is the code. Please help me how to stop the macro from going ot the
last tab.

Sub 50sheets()
Dim ws As Worksheet
For Each ws In Worksheets
With Worksheets(ws.Name)
.Activate
.Range("D8:O10").Select
Selection.FillDown
.Range("D8:O8").Select

.Range("D14:O18").Select
Selection.FillDown

.Range("D22:O25").Select
Selection.FillDown

.Range("D29:O33").Select
Selection.FillDown

.Range("D39:O41").Select
Selection.FillDown

.Range("D50:O63").Select
Selection.FillDown

.Range("D80:O80").Select
Selection.FillDown


End With
Next ws

Worksheets("1").Activate

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"