Do you have a worksheet from which you need to print only portions of the data available? There are two ways you can control what gets printed—by using a macro or by using custom views.
If you have multiple areas that you print in a worksheet, you may get tired of repeatedly specifying what area you want to print and then printing it. Such a task is well suited to being done with a macro. The macro can take care of specifying a print area and then actually printing the information.
For instance, let's assume that you have two print ranges defined in your worksheet: Range1 and Range2. Further, Range1 should be printed in portrait orientation and Range2 should be printed in landscape orientation. The following macros can be used to print each of the print ranges:
Sub PrintRange1()
ActiveSheet.PageSetup.PrintArea = Range("range1").Address
ActiveSheet.PageSetup.Orientation = xlPortrait
ActiveWindow.SelectedSheets.PrintOut
End Sub
Sub PrintRange2()
ActiveSheet.PageSetup.PrintArea = Range("range2").Address
ActiveSheet.PageSetup.Orientation = xlLandscape
ActiveWindow.SelectedSheets.PrintOut
End Sub
These are very simple macros, but you get the idea—all you need to do is set up the print job in the macro, and then print from the macro itself. You could even attach the macros to toolbar buttons or to a menu option.
If you prefer to not use macros, you could also use the custom views feature of Excel. Simply set the print area, orientation, margins, and other settings desired. Then define this as a custom view. To define a custom view, follow these steps:
1. Make sure the View tab of the ribbon is displayed.
2. In the Workbook Views group, click Custom Views. Excel displays the Custom Views dialog box. (Click here to see a related figure.)
3. Click on Add. Excel displays the Add View dialog box. (Click here to see a related figure.)
4. Enter a descriptive name for the view you are defining.
5. Make sure the Print Settings check box is selected.
6. Click OK.
You can continue to define and save additional views, as desired. Your custom views are saved with your workbook, and you can later use them to print what you want. (Just display the custom view and then print your worksheet.)

Great tip! This is an awesome overview of printing specific data in Excel. You should join the Excel conversation on Facebook at http://www.facebook.com/office
ReplyDeleteKeep up the great posts!
Cheers,
Andy
MSFT Office Outreach Team
Maybe its just me, but excel 2007 seems quite complicated. According to a guide about the excel print area (http://www.excel-aid.com/excel-print-area-setting-and-clearing-print-areas.html ), this seems far easier in excel 2010. Or is that just me being unexperienced? Which is very much a possibility i might add :)
ReplyDelete