How to Change Page Orientation in Excel?

Page orientation can be important when planning to print your work in Excel.

While the default page orientation in Excel is the Portrait mode (where the length of the page is more than the width), if you have a data set where there are more columns than rows, you may want to change the orientation to Landscape.

In this tutorial, I will show you some easy ways to change page orientation in Excel.

Change Page Orientation Using the Page Layout Tab

The easiest way to change the page orientation of your worksheet in Excel is by using the Orientation option in the Page Layout tab.

Below are the steps to change the Page orientation:

  1. Activate the worksheet for which you want to change the page orientation.
  2. Click the Page Layout tab.
click on the page layout tab in the ribbon
  1. In the Page Setup group, click on the orientation option.
click on the orientation option
  1. Select the page orientation you want (Portrait or Landscape)
select from the portrait or landscape orientation mode

Note: The current page orientation is highlighted in gray color in the Orientation drop-down

Once you have set this orientation, this will be used when you print your worksheet.

Page orientation is a worksheet-specific setting. This means that if you change the page orientation in one of the worksheets, it will only be applied to that worksheet, and all the other worksheets in the workbook will remain unchanged.

Change Page Orientation Using Keyboard Shortcut

If you are a keyboard shortcut aficionado like me, here’s a keyboard shortcut to change the page orientation in Excel:

ALT + P + O + Arrow Keys + Enter

Using ALT + P + O (press these keys one after the other) would take you to a position where you will see the landscape and the portrait mode in the Orientation drop-down.

Then you can use the arrow key to select the orientation you want and then hit the Enter key to apply it.

Change Page Orientation Using Print Preview

You can also change the page orientation setting while printing your data.

This can be done using the Print Preview window that opens where you specify the print and printer settings.

Below I have this data set that I want to print in landscape mode.

data set to print in landscape mode by changing page orientation

Here are the steps to change the print orientation through the print preview window:

  1. Activate the worksheet that you want to print in the landscape mode
  2. Click the File tab and then click on the Print option to open the Print Preview window. You can also use the shortcut Control + P
click on the print option in the file backstage area
  1. Click the Orientation option.
click on portrait orientation
  1. Select the Page orientation you want to use for this print job. In this case, I will go with Landscape mode (as I have more columns than I want to print all of them in one single sheet)
select the page orientation from the drop down

Change Page Orientation Using Page Setup Dialog Box

Another way to change the page orientation in Excel is by using the Page Setup dialog box.

While this is not the fastest way to do this, in case you want to change a couple of settings in the Page Setup dialog box, you can use this method to change the orientation as well.

Below are the steps to do this:

  1. Click the Page Layout tab.
  2. In the Page Setup group, click on the dialog box launcher (that small titled arrow at the bottom right of the group). This will open the Page Setup dialog box.
click on the dialog box launcher in page layout tab
  1. Select the Page tab (if not selected already)
select the page tab in the page setup dialog box
  1. Select the Orientation by selecting the option button (radio button).
select the orientation
  1. Click OK

Note: You can also open the Page Setup dialog box using the keyboard shortcut ALT + P + S + P (press these keys one after the other)

Change Page Orientation of All Worksheets Using VBA

As I mentioned earlier, when you set the page orientation for a worksheet, it is only applied to that specific worksheet and not to other worksheets in your workbook.

But what if you want to change the page orientation of all the worksheets in the workbook?

One way would be to do it manually one by one for each worksheet, but that could be time-consuming in case you have a big workbook with a lot of worksheets.

Let me show you a very simple VBA technique to quickly change the page orientation of all the worksheets in your workbook.

Here are the steps to use VBA to change the page orientation to landscape for all worksheets in the workbook:

  1. Open the workbook where you want to change the page orientation
  2. Click the Developer tab and then click on the Visual Basic icon. It will open the VB editor where we are going to put our code.
click on visual basic option in the ribbon

In case you do not see the Developer tab, you can also use the keyboard shortcut ALT + F11 (hold the Alt key and then press the F 11 key).

  1. In the VB Editor, if you do not see the Immediate Window, click on the View tab and then click on the Immediate Window option. You can also use the keyboard shortcut Control + G
click on immediate window
  1. Copy and paste the following line of VBA code into the immediate window
For each ws in Worksheets: ws.PageSetup.Orientation = xllandscape: Next ws
copy and paste the VBA code in immediate window
  1. Place the cursor at the end of the line
  2. Press the Enter key
  3. Close the VB Editor

As soon as you press the enter key in step 6, the code is executed, and the page orientation of all the worksheets is set to landscape mode.

In case you want to set the orientation to Portrait instead, you can use the below VBA code in the immediate window and follow the same steps:

For each ws in Worksheets: ws.PageSetup.Orientation = xlPortrait: Next ws

So these are some of the ways you can use to change the page orientation of your worksheets in Excel.

The easiest way to do this is by using the option in the Page Layout tab in the ribbon in Excel or using the orientation option in the Print Preview window.

You can also do this using the Page Setup dialog box in case you are changing multiple page settings.

And in case you have a lot of worksheets, and you want to change the page orientation for all the worksheets in the workbook, you can use the VBA method.

Other Excel articles you may also like:

Excel Ebook Subscribe

FREE EXCEL BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Sumit Bansal
Hello there! I'm Sumit Bansal, founder of trumpexcel.com and an Excel MVP. I started this website in 2013 with a simple goal: to share my love for Excel through easy to follow tips, tutorials and videos. I'm here to help you get the best out of MS Excel to save time and boost your productivity.

Leave a Comment

Free-Excel-Tips-EBook-Sumit-Bansal-1.png

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Free-Excel-Tips-EBook-Sumit-Bansal-1.png

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Free Excel Tips EBook Sumit Bansal

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster