How can this Excel macro be more efficient and more versatile?

I have attached abridged detals of an Excel macro, which each week has to be renamed to work with the current week and enlarged to include an additional line of activity. Although this sort of works, it's cumbersome and I would like it to be more efficient and versatile. I have included details of Week 03, Week 04 and Week 05 so you can see the week by week progression as the macro grows; by the end of the year I will have 52 separate macros. Just one macro to do the whole job would be great. Thanks for any help available.
Bob
Bob BarnesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

regmigrantCommented:
attachment missing?
0
Bob BarnesAuthor Commented:
0
Glenn RayExcel VBA DeveloperCommented:
Here's a slightly more concise version of your first subroutine; you could easily adapt this code to your other two:
Sub Prepare_Week_03()
    Dim r As Integer
    Selection.Copy
    Windows("Week_03.xlsx").Activate
    Range("A2").Select
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
    For r = 5 To 7
        If Cells(r, 2) <> 0 Then GoTo Fin
        Cells(r, 2).EntireRow.Hidden = True
    Next r
Fin:
    Range("A2").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

Open in new window


Regards,
-Glenn
0
Glenn RayExcel VBA DeveloperCommented:
Hi,

Did you have a chance to review and or test my solution?  If so, and it will work for you, can you please properly close this question by clicking the "Accept this solution" link above my submission above that answers your question?.  This will help ensure that future searches are meaningful to other EE members.

Otherwise, let us know if you have any other issues.

Thanks,
 -Glenn
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Spreadsheets

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.