Go to Next Blank Row in Excel

If you ever have to find the next available blank row in a worksheet you could try the following code below. This code would generally be used in conjunction with automatically populating the newly found blank row with data.

Sub Find_Blank_Row()
Dim BlankRow As Long
BlankRow = Range("A65536").End(xlUp).Row + 1
Cells(BlankRow, 1).Select
End Sub

The above works by working up from the bottom of the sheet (row 65536) until it finds a cell containing data in column A. The Row+1 then adds one to the row number so it moves down to the blank cell beneath! If you desired it, you could change the Range(“A65536”).End(xlUp) to Range(“A1”).End(xlDown) and it will then work down the sheet from cell A1.

To make this easier, you could perhaps incorporate this into a small command button on the worksheet itself that finds the next blank row for you when you click it. Try this post on adding a command button to a worksheet.

2 thoughts on “Go to Next Blank Row in Excel

  1. Alex

    This is not quite correct. It does not work if you have an empty cell in the column “A” and any other cell in the same row is not. This code will show the whole row as empty which would not be correct

  2. Kevin Moore

    I believe this also will not work if you have blank rows interspersed with populated rows, and you want to find an empty row in the middle of data.

Leave a Reply

Your email address will not be published. Required fields are marked *