Want to become an expert in VBA? So this is the right place for you. This blog mainly focus on teaching how to apply Visual Basic for Microsoft Excel. So improve the functionality of your excel workbooks with the aid of this blog. Also ask any questions you have regarding MS Excel and applying VBA. We are happy to assist you.

Find last cell filled with data in a specific column

Think you have data in a cells of column "A". And you want to identify the last cell of that column having data. (i.e. You want to get last row number having data). In such occasion use below code. value of Z-1 will be last row having data. Value of Z will be next empty row.

But there shouldn't be any empty cells in between along that column.


'Find last cell of column "A" filled with data

Dim z As Integer

z = 3
Do Until Worksheets("Sheet1").Range("A" & z).Value = ""
     z = z + 1
Loop '(z-1=Last row having data)

Contact Form

Name

Email *

Message *

Popular Posts