Contar Numero De Filas En Excel Vba Review

MsgBox "Number of rows: " & rowCount End Sub Sub CountRowsInColumn() Dim rowCount As Long ' Count rows with data in column A (active sheet) rowCount = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row

' Check if sheet is empty If lastRow = 1 And IsEmpty(ws.Range("A1")) Then lastRow = 0 End If contar numero de filas en excel vba

MsgBox "Number of rows: " & rowCount End Sub Sub GetRowCount() Dim ws As Worksheet Dim lastRow As Long ' Set the worksheet Set ws = ThisWorkbook.Sheets("Sheet1") MsgBox "Number of rows: " & rowCount End