It is time-consuming to scroll and go to the first or last empty row while you are working on a huge worksheet. In this article, I introduce some tricks for quickly going to the first or last empty row in Excel.
Here are two VBA can help you quickly go to the first or last empty row in active sheet, please do as below.
1. Press Alt + F11 keys to enable Microsoft Visual Basic for Applications window. See screenshot:
2. Then click Insert > Module and paste below code into the script. See screenshot:
VBA: Go to first blank row.
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
If Rng.Value = "" Then
MsgBox "No Value, in " & Rng.Address
3. Press F5 to run the code, and a dialog pops out to remind you to choose a range to work. See screenshot:
4. Click OK. A dialog pops out to remind you the cell reference of the first blank row, see screenshot:
5. Click OK repeatedly to close the Microsoft Excel dialog. And then go to the Name box, type A2 into it, press Enter key, and you will go to the first blank row. See screenshot:
Tip: If you want to go to the last empty row, please use below VBA code, and after you press an F5 key, the cursor directly goes to the last blank row.
VBA: Go to last empty row
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
Note: This VBA will select the last empty cell in the Column A. To select last empty cell in another column, please change 1 in the code Cells(Rows.Count, 1) to another number.
Go to last empty row or column with Select Last Row utility
If you want to go to last empty row or column quickly, you can apply Kutools for Excel’s Last Row or Last Column utility. With them, you can quickly go to the last nonblank cell of last row or column in current worksheet, and then the next cell is the last empty row or empty column.
Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
More than 300 powerful features. Supports Office/Excel
2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features
30-day free trial. 60-day money back guarantee.