-1

I've this excel file with normal data. I want to know if there's is a way to know how many rows contains values using a macro with VB code.

enter image description here

Guillermo Oramas R.
  • 1,303
  • 2
  • 14
  • 31

1 Answers1

1

Based on your Comment:

Sub qwerty()
    Dim r As Range
    Dim nLastRow As Long
    ActiveSheet.UsedRange
    Set r = ActiveSheet.UsedRange
    nLastRow = r.Rows.Count + r.Row - 1
    MsgBox nLastRow
End Sub
Gary's Student
  • 95,722
  • 10
  • 59
  • 99