Excel: END Key Functionality Changed in Version 4.0

ID: Q88677


The information in this article applies to:


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: change


Keywords          : 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: March 26, 1999