Written by Allen Wyatt (last updated July 1, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021
If Cindy freezes panes in a worksheet and then saves the workbook, the next time she opens that workbook the previously frozen panes no longer appear. Each time she opens the workbook, she needs to reset the panes. Cindy doesn't think it used to be this way in older versions of Excel and wonders if there is some setting she needs to make or wonders, perhaps, if Excel has changed how it handles panes. She wants to save the pane settings with the workbook so they persist from one usage to another.
The default behavior of the latest versions of Excel is that your pane settings should be persistent, just as Cindy remembers in older versions of Excel. If that is apparently not happening for you, there are a few things you can check:
If none of those ring a bell with you, try starting with a brand new, blank workbook. Put some test data in it, freeze the panes, and then save it. Exit Excel and open the workbook again. If the panes are still there, then this is a good sign that the problem is with the other workbook only. In that case, it could be that the workbook is becoming corrupted (for some reason) and you may need to work on getting your data into a different workbook.
There are two other things you can do, if you desire. One is to simply save a custom view of your worksheet, with the panes in place. You should then be able to load the custom view at a later time and have the pane settings be present (along with many other settings) so that you can continue working with the workbook.
The other thing you could try is to create your own macro that sets the panes as you want them to appear. Here's an example:
Private Sub Workbook_Open() Sheets("Sheet1").Select ActiveSheet.Range("D4").Select ActiveWindow.FreezePanes = True End Sub
This macro would be added to the ThisWorkbook module, and you'll need to change the cell reference (D4) and worksheet name (Sheet1) to reflect where you want the panes set. You could also, if desired, change the code to a "regular" macro that could be assigned to a shortcut key or the Quick Access Toolbar. That way you could use the macro to set similar panes in any worksheet, with the click of a button.
Sub SetPanes() ActiveSheet.Range("D4").Select ActiveWindow.FreezePanes = True End Sub
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (604) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
Want to find out exactly what version of Excel you are using? Here's how to get to the info.
Discover MoreIt can be frustrating if you try to jump to the last cell in a worksheet, only to find out that you are taken to some ...
Discover MoreWant to be notified whenever your worksheet needs to be recalculated? Excel may already have you covered, as described in ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2023-07-01 10:26:42
J. Woolley
My Excel Toolbox includes the following dynamic array function to list all panes of the active window in four columns (Pane, ScrollColumn, ScrollRow, VisibleRange):
=ListPanes()
The following dynamic array function will list all properties of the active window (including freeze, split, and scroll information):
=ListWNProperties([SkipIgnored],[SkipHeader])
My Excel Toolbox's SpillArray function (described in UseSpillArray.pdf) simulates a dynamic array in older versions of Excel:
=SpillArray(...)
See https://sites.google.com/view/MyExcelToolbox
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 © 2024 Sharon Parq Associates, Inc.
Comments