Finding the End of the Worksheet

Written by Allen Wyatt (last updated December 18, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003


2

When you press Ctrl+End, Excel takes you to the bottom cell of your worksheet. This is defined as the intersection of the right-most column and the bottom row. If you delete some rows or columns in the worksheet, you would expect that Ctrl+End would still take you to the bottom cell. It does not, however. What it does is take you to the original bottom cell.

For instance, if you load a worksheet for which the bottom cell is H20, and then delete three rows and one column, you would expect Ctrl+End to take you to G17. Instead, it still takes you to H20.

The only way around this is to save the file. You don't have to close it, simply save the file. Doing so causes Excel to recalculate the bottom cell.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1923) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Seeing Full File Names in the Files Menu

Wouldn't it be great if you could look at the files in the MRU list and see the full path and file names? Excel condenses ...

Discover More

Resizing a Text Box in a Macro

Text boxes are easy to add to a worksheet and manually resize, as needed. If you want to resize the text box in a macro, ...

Discover More

Putting Something in Every Cell of a Table

Need to make sure that all the cells of a table have something in them? It's easy to do with a handy little macro.

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (menu)

Jumping To a Specific Page

Want to jump to a specific printed page within a worksheet? It's not as easy as you might think, but here's some ...

Discover More

Going to the Corners of a Selected Range

When you select a range of cells (particularly if it is a large range of cells), you may not be quite sure if you've ...

Discover More

Limiting Scroll Area

If you need to limit the cells that are accessible by the user of a worksheet, VBA can come to the rescue. This doesn't ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

2016-06-12 06:28:47

Willy Vanhaelen

You can also add this macro to your personal book:

Sub GoToLastCell()
If TypeName(Selection) <> "Range" Then Exit Sub
ActiveSheet.UsedRange.SpecialCells(xlLastCell).Select
End Sub

You can it assign the shortcut key Alt+Ctrl+End in "ThisWorkbook" of you personal book:

Private Sub Workbook_Open()
Application.OnKey "^%{end}", "GoToLastCell" 'Alt+Ctrl+End
End Sub

From now on when you press Alt+Ctrl+End you always get the real last cell no matter whether you deleted some column/rows or not even if your file hasn't been saved.


2016-06-11 05:09:47

Rick Rothstein

Another way around the problem (in case you don't want to physically save the file at that particular time) is to go into the VB editor (press Alt+F11 from any worksheet) and execute a command in the Immediate Window (press Ctrl+G if not visible) that involves the UsedRange. For example, executing this in the Immediate window clears the problem...

? ActiveSheet.UsedRange.Address


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.