Row count where data exists
I need to count the total number of rows that have data. I want to be able to use this on multiple sheets with different amounts of data rows. I cannot figure out generic code that will count the number of rows from A1-A100 or A1-A300. I am trying to use something like this. i = ActiveWorkbook.Worksheets("Sheet1").Range("A2 , Range("A2").End(xlDown)).Rows.Count If you need VBA, you could do something quick like this: Sub Test() With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row MsgBox lastRow End With End Sub This will print the number of the last row with data in it. Obviously