Contar Numero De Filas En Excel Vba -

' Find last row with data in column A On Error Resume Next lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row On Error GoTo 0

MsgBox "Number of rows with data in column A: " & rowCount End Sub Sub CountRowsSpecificSheet() Dim rowCount As Long ' Count rows in column A of "Sheet1" rowCount = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row contar numero de filas en excel vba

' Check if sheet is empty If lastRow = 1 And IsEmpty(ws.Range("A1")) Then lastRow = 0 End If ' Find last row with data in column

Here's the VBA code to count the number of rows in an Excel worksheet: Sub CountRows() Dim rowCount As Long ' Count rows in the used range of active sheet rowCount = ActiveSheet.UsedRange.Rows.Count contar numero de filas en excel vba

contar numero de filas en excel vba

Sillystou

Grand fan des jeux rétros et critique pendant ses temps libres, il aime les jeux de sports, de course et d'aventures! Un autre petit détail : il est également un grand passionné de Lego.

Laisser un commentaire

Votre adresse courriel ne sera pas publiée. Les champs obligatoires sont indiqués avec *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.