7 Ways to Change Page Orientation in Microsoft Excel

Do you need to change the orientation of an Excel worksheet for printing purposes but don’t know how? Read this quick tutorial to learn how to change page orientation in Excel in various ways.

Let’s say you created a sales report and need to print it on paper sheets and PDFs to distribute among various business stakeholders and investors. If you try to print the Excel spreadsheet as is, you’ll find that the printed document has less data per sheet of paper, and also the report seems hard to read. Not to mention, you’ll discover that most rows and columns are incomplete.

However, if you know the different page layout options of Excel and apply the right one before printing, you can avoid such problems.

Keep reading to discover various methods to change page orientation and choose the right one for you in Excel.

Reasons to Change Page Orientation in Excel

  • Fit more data on a single page and minimize the need for excessive scrolling.
  • Enhance the readability of text-heavy documents and improve overall legibility.
  • Maintain consistency with other documents, ensuring a cohesive and professional appearance.
  • Facilitate easy sharing and printing, as portrait orientation is the default setting for most printers and paper sizes.
  • Adhere to industry standards or guidelines that require documents to be presented in a specific orientation.
  • Optimize data presentation, especially for wide tables, charts, or graphs.
  • Create customized reports with visually appealing layouts.
  • Accommodate large worksheets by utilizing landscape orientation.
  • Improve the accuracy and appearance of printouts, avoiding data truncation or distortion.
  • Enhance data analysis by aligning the page orientation with the type of analysis being conducted.

Change Page Orientation on the Page Layout Tab

The Page Layout tab on the Excel ribbon provides various standard page setup options should you need to print the worksheet or workbook. Among those settings, one is Orientation. Here’s how to use this setting:

Page layout for page orientation in Excel
Page layout for page orientation in Excel
  1. On your Excel worksheet, click the Page Layout tab on the ribbon menu.
  2. Click the Orientation command and choose Portrait or Landscape.
  3. The Portrait orientation allows you to accommodate more rows, whereas Landscape lets you include more columns but fewer rows.

Page Setup Dialog Box to Change Page Orientation

Do you love to use various Excel shortcut keys to escape manual clicks and navigation? Then, try the following steps to modify the orientation of the printable page area on Excel:

Page Setup to change page orientation in Excel
Page Setup to change page orientation in Excel
  1. Suppose, you’re on the Home tab of your Excel worksheet.
  2. Press Alt and then press H > P > S+P to bring up the Page Setup dialog box.
  3. On this window, you should see the Orientation option with Portrait and Landscape under the Page tab.
  4. Choose the one you need and hit OK.
Horizontal dotted line for landscape
Horizontal dotted line for landscape
  1. You’ll see a dotted line (horizontal for Landscape and vertical for Portrait) demarcating the printable area on the worksheet.

You should modify the Excel worksheet so that the content comes within the demarcated zones. This ensures your report data will be within the entire page. If there is more than one page worth of data, you’ll see more pairs of dotted lines as you scroll down the worksheet.

Change the Orientation of Excel Pages While Printing

If you don’t want any distraction on the Excel worksheet like a dotted line when working on data analysis and visualization, you can change the orientation before printing the report. Here’s how:

Using print preview to change page orientation in Excel
Using print preview to change page orientation in Excel
  1. Once you’re ready to print the Excel report, hit Ctrl + P keys on the keyboard.
  2. This should open the Print Preview tool of Excel.
  3. There, under the Settings section, you should see Landscape Orientation.
  4. Click the drop-down menu to choose Portrait Orientation.
  5. Accordingly, the preview will change and show the printable area.
  6. If the print preview doesn’t look good, click the back arrow to go to the Home tab.
  7. Now, adjust the rows and columns to fit the content within the dotted line.
  8. Give the print command again and now the preview should be okay.

By default, all Excel worksheets are in the Landscape Orientation in the Print Preview tool. You must change that to Portrait if you need to change the default selection.

Modify the Excel Page Orientation for Multiple Worksheets

Suppose, there are multiple worksheets in your Excel workbook. You want to switch all these to the Portrait orientation for printing purposes. Here’s how you can accomplish that:

Changing page orientation for multiple worksheets
Changing page orientation for multiple worksheets
  1. Click Ctrl and select all the worksheets in the Excel sheets menu at the bottom of the software.
  2. Now, click the Page Layout tab and choose any page orientation from Landscape and Portrait.
  3. Browse individual worksheets and you should see all of them are in the selected page orientation.

Create an Excel Template for Altered Page Orientation

If you use an Excel template, you no longer need to change the orientation of each Excel worksheet before printing. All you need to do is open the template, copy fresh data, and print the workbook or selected worksheets.

You already have an Excel file with an altered page orientation. Find below the steps to save the file as a template:

Changing page orientation for multiple worksheets
Changing page orientation for multiple worksheets
  1. Click the File tab and choose Save As.
  2. Now, select Browse under the Save As section on the right side.
  3. On the Save As dialog box, choose a destination directory for the new file.
  4. Now, click the Save as type drop-down list and choose the Excel Template (XLTX) file type.
  5. Click the Save button to complete the process.

When you need to use the template, go to the destination where you saved it and open the file. Make the necessary changes like importing new data or updating an existing chart. Click Ctrl + S to save the file as a different one. Now, simply print the content and you get the previously set page orientation.

Changing Excel Page Orientation Using a VBA Script

Let’s consider you want to automate the page orientation changing process in Excel. For that, you can use the following VBA script. The script converts page orientation to Portrait if the existing orientation is Landscape and vice versa. Here are the steps to create and run the macro:

Also read: How To Use The VBA Code You Find Online

Create and save a vba script
Create and save a VBA script
  1. Hit Alt + F11 to bring up the Excel VBA Editor tool.
  2. Click Insert and choose Module in the VBA Editor toolbar.
  3. Copy and paste the following script into the blank Module:
Sub TogglePageOrientation()
    If ActiveSheet.PageSetup.Orientation = xlLandscape Then
        ActiveSheet.PageSetup.Orientation = xlPortrait
        ActiveSheet.PageSetup.Orientation = xlLandscape
    End If
End Sub
  1. Click the Save button and close the VBA Editor tool.
Macro dialog box to run a macro
Macro dialog box to run a macro
  1. Now, press the Alt + F8 keys together to open the Macro dialog box.
  2. There, choose the TogglePageOrientation macro and hit the Run button to run the VBA macro.
  3. Excel will automatically change the page orientation to Portrait if it’s in Landscape and vice versa on the active worksheet.

You could also attach this small script to your VBA project. Thus, when you execute the parent macro, Excel will process all the tasks and finally set the desired page orientation. Thus, you can go directly to the Print Preview page by pressing the Ctrl + P keys. No need to manually execute an extra VBA macro.

How to Change Page Orientation in Excel Using Office Scripts

If you’re using the Excel for Microsoft 365 desktop app or the Excel web app, you can use Office Scripts for advanced automation. However, there must be an active Microsoft 365 subscription in your account. If you see the Automate tab in your Excel web app or desktop app, you can use this to convert the page orientation in Excel. Here’s how:

Create and Save Office scripts code
Create and Save Office Scripts code
  1. Click the Automate tab and select the New Script button.
  2. The Code Editor tool will pop up on the right side of the Excel app.
  3. There, delete the existing code and then copy and paste the following script:
function main(workbook: ExcelScript.Workbook) {
	let selectedSheet = workbook.getActiveWorksheet();
	// Set print area for selectedSheet to range "A1:I31"
	// Set ExcelScript.PageOrientation.portrait orientation for selectedSheet
	// Set Letter paperSize for selectedSheet
	// Set No Scaling scaling for selectedSheet
	selectedSheet.getPageLayout().setZoom({scale: 100});
  1. Click the Save script button and then hit the Run button on the Code Editor tool.
  2. By doing so, you can change the orientation of a page in Excel from Landscape to Portrait.

If your Excel worksheet is in the Portrait orientation already and you need the Landscape orientation change all the occurrences of portrait to landscape.

You can include this Office Scripts code in your existing project. Thus, running the parent script will do all the tasks that you coded into the script and set page orientation to either Portrait or Landscape automatically.


These are all popular ways to change page orientation in Excel. You can use the Page Layout tab, Page Setup dialog box, or the Print Preview tool to manually set an appropriate page orientation.

Suppose, your worksheet has VBA or Office Scripts-based automation, you can include the given VBA scripts and Office Scripts codes to make the page orientation selection process automated.

Do you know any other tips for setting the page orientation? Let me know in the comments below!

About the Author

Tamal Das

Tamal Das

I'm a freelance writer at HowToExcel.org. After completing my MS in Science, I joined reputed IT consultancy companies to acquire hands-on knowledge of data analysis and data visualization techniques as a business analyst. Now, I'm a professional freelance content writer for everything Excel and its advanced support tools, like Power Pivot, Power Query, Office Scripts, and Excel VBA. I published many tutorials and how-to articles on Excel for sites like MakeUseOf, AddictiveTips, OnSheets, Technipages, and AppleToolBox. In weekends, I perform in-depth web search to learn the latest tricks and tips of Excel so I can write on these in the weekdays!


Subscribe for awesome Microsoft Excel videos 😃

Related Posts



Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃