How to Change Page Orientation in Excel (Portrait to Landscape)

Last Updated: March 24, 2024
puneet-gogia-excel-champs

- Written by Puneet

In Excel, you can choose between two orientations (Portrait or Landscape) and change them according to your needs.

In this tutorial, we will learn to change page orientation in Excel.

change-page-orientation

Types of Page Orientation in Excel

In Microsoft Excel, page orientation refers to the direction in which the worksheet is displayed when printed. There are two main types of page orientations:

Portrait Orientation: This is the default setting in Excel. In this orientation, the page is taller than it is wide. This makes it particularly suitable for lists or data that are more vertical, such as a list of names or a balance sheet. The portrait orientation is ideal for reading on mobile devices or in print, as the vertical layout aligns with the natural way of flipping pages.

Landscape Orientation: This orientation is wider than tall, like a landscape painting. This makes it a good choice for data with many columns, such as a large dataset or a schedule. It is typically used when the data spans many columns but only a few rows. Landscape orientation can make the data easier to read on widescreen or when you want to fit more content horizontally on the page.

Steps to Change Page Orientation to Landscape in Excel (From Page Layout Tab)

  1. First, of all go to the Page Layout Tab.
    page-layout-tab
  2. Next, in the Page Layout Tab, you have the ‘Page Setup” group, and you have an Orientation Option.
    orientation-icon
  3. Now, click on the Orientation drop-down.
    orientation-drop-down
  4. In the end, click select the orientation (Portrait or Landscape) that you want to apply.

Please note again that using the page layout tab will change the orientation for the entire active worksheet, not just a particular selection of cells.

Change Page Orientation from Page Setup in Excel

  1. First, use the keyboard shortcut (Alt ⇢ P ⇢ S ⇢ P) to open the page setup dialog box, or you can click on the down arrow on the bottom right on the “Page Setup” group.
    page-setup-group
  2. From here, in the “Page Setup” dialog box, you have the Orientation to select.
    select-orientation-portrait
  3. Now, change the orientation as you want.
    select-orientation-landscape
  4. In the end, click OK to apply.

Change Page Orientation from Print Preview

You can change the orientation from the print preview.

orientation-from-print-preview
  1. Click on the File Tab: Look at the top left corner of the Excel window and click on the “File” tab. This will provide access to various options related to your Excel workbook.
  2. Select the Print Option: After clicking the “File” tab, select the “Print” option. This will open a preview of your worksheet as it would appear if printed, allowing you to see the current orientation and how your data fits within it.
  3. Locate the Orientation Drop-Down: You’ll find an “Orientation” drop-down in the print settings. This section gives you two options for how your page can be oriented: “Portrait” and “Landscape.” Portrait orientation will make your printed page taller than it is wide and suitable for lists or data that are more vertical. On the other hand, landscape orientation will make your sheet wider than tall, which is beneficial for data spanning many columns.
  4. Choose Your Desired Orientation: Decide which orientation best suits your needs and click on it. For Example, select Landscape Orientation. This will apply your selected orientation to the worksheet.

Remember, this change will affect the entire worksheet, not just a specific selection of cells.

Keyboard Shortcut to Change Page Orientation

Alt > P > S > P

To change the page orientation using a keyboard shortcut in Excel, follow these steps:

  1. Press Alt > P > S > P on your keyboard to open the Page Setup dialog box.
  2. In the Page Setup dialog box, under the “Page” tab, you will find options for “Portrait” and “Landscape” in the “Orientation” section.
  3. Use the arrow keys to choose the orientation that suits your needs.
  4. Press Enter to close the dialog box. Your selected orientation is now applied to the entire worksheet.

Using a VBA Code (Macro) to Apply Landscape Orientation in Excel

You can also use a VBA code to change the orientation.

vba-code-change-orientation
Sub Macro1()

    'Apply Portrait Orientation
    ActiveSheet.PageSetup.Orientation = xlPortrait

    'Apply Landscape Orientation
    ActiveSheet.PageSetup.Orientation = xlLandscape

End Sub

To understand how this code works, make sure to go through the below line-by-line explanation:

  • The Sub Macro1() line starts the definition of a macro named “Macro1”.
  • The 'Apply Portrait Orientation is a comment explaining that the next line of code will set the orientation of the active sheet to Portrait.
  • The line ActiveSheet.PageSetup.Orientation = xlPortrait sets the orientation of the active Excel sheet to Portrait. xlPortrait is a constant in VBA that represents portrait orientation.
  • The 'Apply Landscape Orientation is another comment explaining that the next line of code will set the orientation of the active sheet to Landscape.
  • The line ActiveSheet.PageSetup.Orientation = xlLandscape changes the orientation of the active Excel sheet to Landscape. xlLandscape is a constant in VBA that represents landscape orientation.
  • The End Sub line ends the definition of the macro.