Excel: END Key Functionality Changed in Version 4.0

Last reviewed: July 16, 1997
Article ID: Q88677

The information in this article applies to:
  • Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
  • Microsoft Excel for the Macintosh, versions 4.0, 5.0

SUMMARY

In Microsoft Excel, the functionality of the END key was changed in version 4.0 and later. In version 3.0, pressing the END key moved the active cell to the last cell in the current row. In version 4.0 and later, pressing the END key toggles END mode on and off. If you press END followed by the ENTER key (RETURN on the Macintosh), Microsoft Excel moves the active cell to the last cell in the current row.

MORE INFORMATION

The functionality of the END key was changed to incorporate END mode, which provides a number of ways to move and select cells in a worksheet. For more information on moving and selecting with the END key, see pages 80-82 in "User's Guide" version 5.0 or pages 548-551 in "User's Guide 1" version 4.0.

Macros to Return Microsoft Excel 3.0 Functionality to the END Key

The following set of macros returns Microsoft Excel 3.0 functionality to the END key in Microsoft Excel 4.0. For more information about writing command macros, see pages 235 to 237 in "Microsoft Excel User's Guide 2."

After entering and naming these macros, save and close your macro sheet and then reopen it. The Auto_Open macro runs automatically when you open your macro sheet.

 A1: Auto_Open
 A2: =ON.KEY("{END}","Excel_3.0_End_Key")
 A3: =ON.KEY("+{END}","Excel_3.0_Shift_End_Key")
 A4: =RETURN()
 A5:
 A6: Excel_3.0_End_Key
 A7: LastCol=GET.DOCUMENT(12)
 A8: =SELECT("RC"&IF(LastCol>0,LastCol,""))
 A9: =RETURN()
A10: A11: Excel_3.0_Shift_End_Key A12: LastCol=GET.DOCUMENT(12) A13: =SELECT("RC:RC"&IF(LastCol>0,LastCol,"")) A14: =RETURN()

The ON.KEY() functions tell Microsoft Excel to run the assigned macros when the END key is pressed. The +{END} version handles the case where SHIFT+END is pressed to select the cells between the current cell and the last cell in the current row.

REFERENCES

"User's Guide," version 5.0, page 80-82 "User's Guide 1," version 4.0, pages 132, 548-551 "User's Guide 2," version 4.0, pages 235-237 "Function Reference," version 4.0, pages 196-199, 302-304, 378-379


Additional query words: 4.0 4.00 5.0 5.00 change


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: July 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.