Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Excel automated task Help

Posted on 2013-10-31
3
Medium Priority
?
211 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 53

Expert Comment

by:Rgonzo1971
ID: 39613611
Hi,

Could you send an example?

Regards
0
 
LVL 12

Accepted Solution

by:
Harry Lee earned 2000 total points
ID: 39615100
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
ID: 39615303
Perfect. Thank you very much for your quick response!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

927 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