Excel: Finding Cell References in a Split or Frozen PaneLast reviewed: November 30, 1994Article ID: Q52129 |
The information in this article applies to:
SUMMARYTo 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.
MORE INFORMATIONFor 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:
=SELECT(OFFSET(!A1,A1-1,A2-1)) REFERENCES"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
|
KBCategory: kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |