Excel: Creating Key Commands for Page Right/Left/Down/Up

Last reviewed: November 29, 1994
Article ID: Q25494
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 1.x, 2.2, 3.0, 4.0

SUMMARY

Currently, there are no built-in key commands to perform the functions of page right, page left, page down, and page up in Microsoft Excel. However, the following command macros can be defined to perform these functions when a key combination is pressed.

NOTE: The macro sheet containing the macros must be open in order for the commands to operate.

To scroll one screen to the right, enter the following commands into a macro sheet:

   +---+------------+
   |   |     A      |  1. Select cell A1.
   +---+------------+  2. From the Formula menu, choose Define Name.
   | 1 | pageright  |  3. Under Macro, select Command.
   +---+------------+  4. Type "r" (without quotation marks) in the
   | 2 | =HPAGE(1)  |     Key box.
   +---+------------+  5. Select OK.
   | 3 | =RETURN()  |
   +---+------------+  To page to the right, press COMMAND+OPTION+R.

To scroll one screen to the left, enter the following commands into a macro sheet:

   +---+------------+
   |   |     A      |  1. Select cell A5.
   +---+------------+  2. From the Formula menu, choose Define Name.
   | 5 | pageleft   |  3. Under Macro, select Command.
   +---+------------+  4. Type "l" (without quotation marks) in the
   | 6 | =HPAGE(-1) |     Key box.
   +---+------------+  5. Select OK.
   | 7 | =RETURN()  |
   +---+------------+  To page to the left, press COMMAND+OPTION+l.

To scroll one screen down, enter the following commands into a macro sheet:

   +---+------------+
   |   |     A      |  1. Select cell A9.
   +---+------------+  2. From the Formula menu, choose Define Name.
   | 9 | pagedown   |  3. Under Macro, select Command.
   +---+------------+  4. Type "d" (without quotation marks) in the
   | 10| =VPAGE(1)  |     Key box.
   +---+------------+  5. Select OK.
   | 11| =RETURN()  |
   +---+------------+  To page down, press COMMAND+OPTION+D.

To scroll one screen up, enter the following commands into a macro sheet:

   +---+------------+
   |   |     A      |  1. Select cell A13.
   +---+------------+  2. From the Formula menu, choose Define Name.
   | 13| pageup     |  3. Under Macro, select Command.
   +---+------------+  4. Type "u" (without quotation marks) in the
   | 14| =VPAGE(-1) |     Key box.
   +---+------------+  5. Select OK.
   | 15| =RETURN()  |
   +---+------------+  To page up, press COMMAND+OPTION+U.

For more information on the HPAGE and VPAGE functions, see pages 222 and 452, respectively in the "Microsoft Excel Function Reference," version 4.0 manual. If you are using Excel version 3.0, see pages 125 and 247, respectively, in the "Microsoft Excel Function Reference" version 3.0 manual. If you are using Excel 2.20, see page 243 in the "Microsoft Excel Functions and Macros" version 2.2 manual.


KBCategory: kbother
KBSubcategory:

Additional reference words: 1,x 2.20 3.00 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.