If you have more than one workbook open at a time, Excel allows you to view all the workbooks at the same time and to arrange each window as you desire. The easiest method of arranging workbook windows is as follows:
Figure 1. The Arrange Windows dialog box.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7885) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel here: Arranging Workbook Windows.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
When working with multiple workbooks, you'll typically want to resize the workbook windows so you can see the data from ...
Discover MoreIf you need to look at different parts of the same worksheet at the same time, the answer is to create windows for your ...
Discover MoreNeed to test your formulas? Then you need some testing data that you can use to see if the formulas function as you ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2018-04-17 11:34:51
David Bonin
Chris C,
Sorry, but I'm not seeing it. Am I missing something?
Your method works fine to display separate Excel files, each running in its own, separate Excel session. It doesn't appear to work with multiple files running in a single session of Excel.
I find it much more convenient and useful to open two or more files in a single session of Excel. (For example, when running macros in one file to fetch or process data in another.) The macros I outlined below spread my one Excel session across the center (main) and right monitors of my three-monitor setup.
2018-04-16 12:16:40
Chris C
For situations were you only need to arrange two excel workbooks, for example when comparing two, or copy/pasting from one to another, the 'Windows' keyboard shortcut might be the easiest way. Assuming the 2 are open in one screen, just select one then hold the 'Windows' key down (4 little rectangles like the logo) and tap the left arrow key. This will place the workbook in the left half of the screen. Now select the second workbook, hold down the windows key and tap the right arrow. This places the workbook in the right half of the display. You can also align with the top and bottom using the up and down arrows.
This works for all windows, not just excel. Multiple arrow taps will keep moving the selected program window to other places.
2018-04-16 11:18:56
Dave Bonin
Richard,
I use the following code to spread one session of Excel across two monitors.
If you have two files open, then each fills its own screen. Whichever file is active fills the left screen. This works best if both monitors are the same size and same resolution.
If you have three files open, one will straddle the two monitors (if that's intolerable, then buy a third monitor, you cheapskate!).
You may have to tweak the constants to suit your monitors and display settings.
Assign the macros to Ctrl-m and Ctrl-Shift-m as noted.
As with any code, no warranty is stated nor implied.
REQUEST: I will happily take code improvements if anyone wants to automate any of the values of the constants. I just haven't gotten that far as I use this mostly on my own computer.
Sub FillAllMonitors()
' Purpose: Expand Excel to fill all monitors in side-by-side views.
'
' Notes: Assigned to keyboard shortcut Ctrl-m (m for monitors)
'
' Need to adjust the values for MonitorQuantity, MonitorWidth and MonitorHeight to suit your hardware.
' May also need to similarly adjust the values for MonitorEdges and MonitorGutter.
' May also need to similarly adjust the values for OriginX, OriginY and Pixels2Points.
'
' In the two-monitor view, you may not be able to adjust the overall window so that there are no
' slivers of visible underlying windows (or desktop) outboard of the left and right window edges.
' If so, then center the overall window as best as you can.
' ---------------------------------------------------------------------------------------------------------------------------
' You may need to adjust the constants BELOW to suit your hardware
' ---------------------------------------------------------------------------------------------------------------------------
Const MonitorQty As Double = 2 'How many side-by-side monitors to spread Excel over
' Pick an appropriate pair of Width and Height values and comment out the other(s)
Const MonitorWidth As Double = 1680 'Physical width of monitors in pixels, eg: 1680 wide x 1050 tall
Const MonitorHeight As Double = 1050 'Physical height of monitors in pixels, eg: 1680 wide x 1050 tall
' Const MonitorWidth As Double = 1280 'Physical width of monitors in pixels, eg: 1280 wide x 1024 tall
' Const MonitorHeight As Double = 1024 'Physical height of monitors in pixels, eg: 1280 wide x 1024 tall
Const MonitorEdges As Double = 2 'Allowance for left and right edges in pixels, eg: 2
Const MonitorGutter As Double = 29 'Allowance for bottom toolbar in pixels, eg: 29
Const OriginX As Double = 1 'Where do the monitors start on the horizontal axis in pixels, eg: 1
Const OriginY As Double = 1 'Where do the monitors start on the vertical axis in pixels, eg: 1
Const Pixels2Points As Double = 0.75 'Conversion factor between pixels and points
' ---------------------------------------------------------------------------------------------------------------------------
' You may need to adjust the constants ABOVE to suit your hardware
' ---------------------------------------------------------------------------------------------------------------------------
Dim VisibleWindowsCount As Long: VisibleWindowsCount = 0
Dim ThisWindow As Window
' This is the one WindowState we can work with
Application.WindowState = xlNormal
' Anchor the top left corner
Application.Left = Pixels2Points * OriginX
Application.Top = Pixels2Points * OriginY
' Aim for really big knowing it will stop at the physical screen edges
Application.Width = Pixels2Points * ((MonitorQty * MonitorWidth) + MonitorEdges)
Application.Height = Pixels2Points * (MonitorHeight - MonitorGutter)
' How many visible windows
For Each ThisWindow In Application.Windows
If ThisWindow.Visible = True Then VisibleWindowsCount = VisibleWindowsCount + 1
Next ThisWindow
' Arrange windows side by side
If VisibleWindowsCount > 1 Then
Application.Windows.Arrange ArrangeStyle:=xlVertical
' Maximize the active window
Else
On Error Resume Next
Application.ActiveWindow.WindowState = xlMaximized
End If
End Sub
Sub FillOneMonitor()
' Purpose: Maximize Excel to completely fill one monitor.
'
' Notes: Assigned to keyboard shortcut Ctrl-M (M for monitors)
' This is the one WindowState we can work with
Application.WindowState = xlMaximized
' Maximize the active window
On Error Resume Next
Application.ActiveWindow.WindowState = xlMaximized
End Sub
2018-04-16 04:35:27
Richard
I have a dual screen setup. Can Windows arrange workbooks across both screens?
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2019 Sharon Parq Associates, Inc.
Comments