Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to go to first or last empty row in Excel?

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.

Go to first or last empty row with VBA

Go to last empty row or column with Select Last Row utilitygood idea3


Go to first or last empty row with VBA


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:
doc first last empty 1

2. Then click Insert > Module and paste below code into the script. See screenshot:

VBA: Go to first blank row.

Sub Findfirstblankcell()
'UpdatebyExtendoffice20170712
    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
        End If
    Next
End Sub
doc first last empty 2
doc first last empty 3

3. Press F5 to run the code, and a dialog pops out to remind you to choose a range to work. See screenshot:
doc first last empty 4

4. Click OK. A dialog pops out to remind you the cell reference of the first blank row, see screenshot:
doc first last empty 5

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:
doc first last empty 6

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

Sub selectlastemptyrow()
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
End Sub

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.

Kutools for Excel, with more than 120 handy functions, makes your jobs easier. 

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

Click Kutools > Select > Select Last Cell > Last Row/Last Column. See screenshot:

doc first last empty 7

Then the last nonblank cells in the last row (or column) is selected. Just press Down arrow key (or Right arrow key) to activate the last empty row (or column).


Relative Articles


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    test · 6 months ago
    Sub selectlastemptyrow()
    Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
    End Sub



    How to try this on sheet2 from sheet1
    • To post as a guest, your comment is unpublished.
      alexis · 2 months ago
      Sub selectlastemptyrow()
      Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
      End Sub