Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PWK PWK is offline
external usenet poster
 
Posts: 27
Default Looping through worksheets with name change

I have this macro that copies data to new worksheet (below). I would
like to programmably change the day of the week from Sat to Mon, Tue,
Wed, (no Sun) etc. and use a loop so I don’t have to rewrite macro 5
more times. I have asked the primary question on my previous posting
but, am posting this question additionally, it being a new query. Any
help would be appreciated, especially on Saturday.

Sub CombineSat3()

On Error GoTo EndOfMacro

Windows("Consolidated Worksheet.xls").Activate
For x = 1 To 12
Workbooks("combined sheets.xls").Sheets("Sat (" & x & ")").Range
("F6:F11").Copy
Range("AC4").Offset(, x).PasteSpecial Paste:=xlPasteValues,
Operation:=xlNone, _ SkipBlanks :=False, Transpose:=False

Next

EndOfMacro:
Exit Sub

End Sub
Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looping through worksheets Hermeticia Excel Programming 3 April 10th 08 05:01 AM
Looping Thru Worksheets Jay Excel Programming 2 April 12th 07 03:14 PM
Looping through worksheets RominallL Excel Programming 4 February 2nd 07 03:40 PM
Looping through Worksheets Steve Excel Programming 7 July 12th 05 07:56 PM
Looping through Worksheets Kirk P. Excel Programming 1 February 7th 05 05:14 PM


All times are GMT +1. The time now is 11:21 PM.

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

About Us

"It's about Microsoft Excel"