VBA Code to Find Last Row in a Column in Excel

This code finds the last used row in a specific column in the active worksheet.

VBA Code:

Sub FindLastRow()
    Dim lastRow As Long
    lastRow = Cells(Rows.Count, "A").End(xlUp).Row
    MsgBox "Last Row: " & lastRow
End Sub

Check All VBA Codes

Join Our Telegram Group techguruplus telegram group Join Our WhatsApp Group techguruplus whatsapp group

Leave a Comment