Skip to main content

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 300 handy functions, makes your jobs more 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

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Ótimo post, Resolveu meu problema:
Achando a primeira célula vazia de determinada coluna de uma planilha.

Sub SelecionaPróximaCélulaVazia()
Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Select
End Sub

Este VBA selecionará a última célula vazia na coluna B. Para selecionar a última célula vazia em outra coluna, altere 2 no código Cells (Rows.Count, 2) para outro número.
This comment was minimized by the moderator on the site
Sub selectlastemptyrow()
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
End Sub



How to try this on sheet2 from sheet1
This comment was minimized by the moderator on the site
Sub selectlastemptyrow()
Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select
End Sub
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations