Solved

Excel automated task Help

Posted on 2013-10-31
3
142 Views
Last Modified: 2013-10-31
I have a sheet in Excel 2013, and use it for a daily schedule. To generate the sheet, I put a number (from 1 to 31) in cell C1, and all the cells in the sheet update automatically. I then print out the page and go to the next number (so first I enter 1, print, then 2, print, then 3, print, etc.)

I would like to automate this task, so that I can just click GO and excel will fill in the numbers 1 to 31 in the sheet, and print out the sheet (on the default printer) for each number.

Can someone help me create this automated task?
0
Comment
Question by:Lev Seltzer
3 Comments
 
LVL 48

Expert Comment

by:Rgonzo1971
Comment Utility
Hi,

Could you send an example?

Regards
0
 
LVL 12

Accepted Solution

by:
Harry Lee earned 500 total points
Comment Utility
WEBuilder,

Try this code.

Sub PrintDailyReport()
Dim I As Integer

For I = 1 To 31
    Range("C1").Value = I
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
Next

End Sub

Open in new window

0
 

Author Closing Comment

by:Lev Seltzer
Comment Utility
Perfect. Thank you very much for your quick response!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now