This week, learn the solution to last week's Office challenge: What's the most efficient way to print different areas of the same Excel sheet?
- Click the View tab.
- In the Workbook Views group, click Custom Views.
- Click Add.
- Enter a name for the view (the print setting option is checked by default).
- Click OK.
A second solution is a set of macros using the following generic procedure:
ActiveSheet.PageSetup.PrintArea = Range("range").Address
First, you must create range - a named range that includes the data you want to print. Then, run the appropriate macro to print each range, as needed. For instance, you might have three print ranges named Outlook, Sales, and Trends. In this case, you'd have three sub procedures, PrintOutlook, PrintSales, and PrintTrends. A more efficient solution would be to pass a selected range via a user control:
Sub PrintPassedRange(prtrange As String)
ActiveSheet.PageSetup.PrintArea = Range("prtrange").Address
You can also use the procedure to set additional print settings, such as orientation, copy number, and so on.
Once again, thanks to everyone who played along!