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

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.

Additional query words: 1,x 2.20 4.00

Keywords :
Version :
Platform :
Issue type :


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