Consider the list of clients in the dataset below. It showcases Company Names, their Addresses, the location City, and the Zip Code.
Solution 1 – Using the Properties Feature to Stop CTRL+END from Going Too Far
- Go to the Developer tab >> select Properties.
- Click Categorized > in the ScrollArea field, enter the range. Here, $A$1:$F$14.
Note: Provide an Absolute Cell Reference by typing in the $ sign.
- Close the Properties window and press CTRL+END to go to the end of the dataset.
The scrolling area is limited to the data range.
Solution 2 – Deleting Content from Other Cells to Stop the CTRL+END from Going Too Far
There is text in B1048563.
- Click the adjacent column as shown below. Here, Column F.
- Press CTRL+SHIFT+Right Arrow key to select all cells >> Press CTRL+-(Minus) to delete the content.
- Go to the row below the dataset and select it. Here, Row 15.
- Press CTRL+SHIFT+Down Arrow key to select all cells >> Press CTRL+-(Minus) to delete content.
- Press CTRL+END to move to the end of the dataset.
Solution 3 – Utilizing the Immediate Window Feature to Prevent CTRL+END from Going Too Far
- Go to the Developer tab >> click Visual Basic.
In the Visual Basic Editor window:
- Click the View tab >> Select Immediate Window.
- Copy and paste this command into the window and press ENTER.
ActiveSheet.UsedRange
- Close the Visual Basic Editor >> press CTRL+END key and go to the last cell of your dataset.
Solution 4 – Hiding Rows and Columns to Stop CTRL+END from Going Too Far
- Go to the column at the end of the dataset >> left-click to select it. Here, Column G.
- Press CTRL+SHIFT+Right Arrow key to select all cells >> Right-click and choose Hide.
This will hide all the cells to the right of the dataset.
- Go to the row below the dataset and select it. Here, Row 16.
- Press CTRL+SHIFT+Down Arrow key to select the cells with data below >> Right-click and choose Hide.
This is the output.
Solution 5 – Fixing the Range of Cells with a VBA Code
- Go to the Developer tab >> click Visual Basic.
In the Visual Basic Editor :
- Select Insert >> choose Module.
- Copy the code and paste it into the window.
Sub Reset_Last_Cell()
Dim x As Long
x = ActiveSheet.UsedRange.Rows.Count
End Sub
The Sheets.Select method activates the selected sheet (here, Fixing Range of Cells with VBA). The ActiveSheet.ScrollArea property sets the scroll area to the specified range of cells (A1:F14).
- Close the VBA window >> in the Developer tab, click Macros.
In the Macros dialog box:
- Select Fix_Dataset_Range Macro >> Click Run.
Press CTRL+END to go to the end of the dataset. The scrolling area is limited.
Solution 6 – Applying a VBA Code to Stop CTRL+END from Going Too Far
- Follow the steps in Solution 5 to open the VBA window, insert a new Module, and enter the VBA code.
Sub Fix_Dataset_Range()
Sheets("Fixing Range of Cells with VBA").Select
ActiveSheet.ScrollArea = "A1:F14"
End Sub
Define the variable x and assign the Long data type. Use the UsedRange property to count the number of rows and columns within the used range.
- Close the VBA window >> click Macros.
In the Macros dialog box:
- Select the Reset_Last_Cell Macro >> Click Run.
You can move to the last cell of the dataset:
Read More: How to Select Cells in Excel Using Keyboard
Download Practice Workbook
Download the practice workbook.
Related Articles
- Multiple Excel Cells Are Selected with One Click
- How to Select Multiple Cells in Excel Without Mouse
- How to Select Cells in Excel Without Dragging
- How to Select Large Data in Excel Without Dragging
- How to Select Column to End of Data in Excel
- How to Go to Last Non Empty Cell in Column in Excel
<< Go Back to Select Cells | Excel Cells | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!