You may have printed the whole workbook in your Excel file. But sometimes, for business purposes or some other reasons, you may need to print a specific portion of your worksheet and for this, you need to specify and set the area you want to print in your Excel sheet. In this case, the borderline of the print area is edged by a blue line. In this article, I will show you how to set the print area with blue line in Excel.
How to Set Print Area with Blue Line in Excel: 5 Easy Ways
In this section, you will find 5 suitable and efficient ways to set the print area with blue line. Let’s check them now!
1. Set Print Area from Page Layout Tab
Let’s say we have got a dataset of different types of ordered products and the customer information of an online store.
We want to set the print areas for some portion of this dataset.
For setting the printing areas from the page layout tab, proceed with the following steps:
- First of all, select the area you want to print> go to the Page Layout tab> click Print Areas> select Set Print Area. So, your print area is selected.
- Now, go to the View tab> then Page Break Preview and your sheet will show the print area.
So easy, isn’t it? You can set print areas in the blink of an eye in this way!
2. Set Print Area with Blue Line from Page Setup Window
For the previous set of data, now we will show set the print area from the page setup window. And for demonstrating this method, follow the steps below:
- Firstly, go to the Page Layout tab> click the Page Setup window.
- Then, the Page Setup dialogue box will show up. Here, from the Sheet icon, click the arrow in the Print Area box.
- Now, assign the range of the print area.
- After that, close the dialogue box by clicking OK. Excel has set the print area already.
- Finally, go to the View tab> then Page Break View and you will show the print area.
In this way, you can set the print area with this method.
3. Adding Extra Print Area
Suppose you have set your print area using Method 1. But now you need to add an extra area to the previously selected area. For adding extra print area using this method, act like the following steps:
- Firstly, check the previously set area from the View tab> Page Break Preview option. Here, we have assigned a print area previously and you can see that in the screenshot below.
- Now, select the area you want to add to the previously selected print area. I have chosen the adjacent column (i.e. Order Date Column).
- Then, go to the Page Layout tab> click Print Area> select Add to Print Area.
- Hence, your print area is selected. You can check this from the View tab> Page Break Preview.
4. Use of Page Break Preview Option to Set Print Area
For the same set of data, now we will show the use of the Page Break Preview option to set the print area. For demonstrating this method, follow the steps below:
- Firstly, go to the View tab> click Page Break Preview. A page break line will appear showing the boundary line for the first page. Drag this line with the cursor to control the print area.
- Here, after dragging the break line, the area under the line will be on the first page.
- And, the area outside the first border line will be in the second page after printing.
So these are the steps you can follow for setting the print area.
5. Using VBA Macro to Set Print Area with Blue Line
You can also set the area you want to print by using the VBA macro. For applying this method, proceed with the following steps.
- First of all, press ALT+F11 to open the Visual Basic Editor window.
- Then, right-click on your working sheet (i.e. Sheet6) > select Insert> click Module.
- Here, comes the Module window. Enter your code in that window. You can use the following:
Option Explicit Sub Set_Printing_Area() Dim rfPrintArea As Range Dim rfPrintAreaAddress As String Dim rfSheet As Worksheet On Error Resume Next Set rfPrintArea = Application.InputBox(" Select a Range for Print Area", Type:=8) If Not rfPrintArea Is Nothing Then rfPrintAreaAddress = rfPrintArea.Address(True, True, xlA1, False) For Each rfSheet In ActiveWindow.SelectedSheets rfSheet.PageSetup.PrintArea = rfPrintAreaAddress Next End If Set rfPrintArea = Nothing End Sub
- After that, save the macro-enabled workbook and hit ALT+Q to close the macro window.
- Now, click ALT+F8 and the macro dialogue box will come up. Select the Macro name and click run to execute the code.
- Here, assign a range for the area to print. Click OK.
- Now, Excel has set the print area. You can check it from the Page Break Preview option.
So, in this way, you can set the print area of your Excel workbook.
Download Practice Workbook
You can download the practice book below.
In this article, you have learned how to set the print area with blue line in Excel. I hope you can easily set the print area with a blue line in an Excel workbook from now on. If you have better methods, questions, or feedback regarding this article, please don’t forget to share them in the comment box.