Microsoft KB Archive/52129

From BetaArchive Wiki

Excel: Finding Cell References in a Split or Frozen Pane

The information in this article applies to:

  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0
  • Microsoft Excel for the Macintosh, versions 1.5, 2.2, 3.0, 4.0
  • Microsoft Excel for OS/2, versions 2.2 and 3.0


To obtain the row and column numbers of the cells in the panes of a Microsoft Excel document, use the GET.WINDOW command, as follows:

   GET.WINDOW(13) returns an array of the first column in each pane.
   GET.WINDOW(14) returns an array of the first row in each pane.
   GET.WINDOW(15) returns an array of the last column in each pane.
   GET.WINDOW(16) returns an array of the last row in each pane. 

The INDEX command can then be used to return the value of the row and column from the desired pane. The panes are numbered starting with the upper right and proceeding counter-clockwise.


For example, to select the upper-left corner of the fourth pane (lower right) in the active window, use the following macro sequence:

   A1: =INDEX(GET.WINDOW(13),4)
   A2: =INDEX(GET.WINDOW(14),4)
   A3: =SELECT("R"&A1&"C"&A2)
   A4: =RETURN() 

Or, for greater efficiency, you could modify A3 to read:



"Microsoft Excel Function Reference," version 4.0, pages 207-212, 238, 389-390

"Microsoft Excel Function Reference," version 3.0, pages 115-116, 127-129

"Microsoft Excel Functions and Macros," version 2.2, pages 44-45, 239-240

Additional query words: 1.0 1.00 1.03 1.04 1.06 1.5 2.0 2.00 2.01 2.1 2.10 2.20 2.21 3.0

Keywords :
Version :
Platform :
Issue type :
Technology :

Last Reviewed: March 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.