Get total number of rows for a certain worksheet in certain workbook
workbook needs to be open
Needed to get to know if this workbook is in XLS format (65k rows) or in xlsx format (1m rows).
Function RowsCount(Optional Shee = "This", optional Wb = "This")
If Wb = "This" Then Wb = ThisWorkbook.Name
If Shee = "This" Then Shee = Workbooks(Wb).Worksheets(1).Name
RowsCount = Workbooks(Wb).Worksheets(Shee).Range("A1").EntireColumn.Rows.Count
End Function
If Wb = "This" Then Wb = ThisWorkbook.Name
If Shee = "This" Then Shee = Workbooks(Wb).Worksheets(1).Name
RowsCount = Workbooks(Wb).Worksheets(Shee).Range("A1").EntireColumn.Rows.Count
End Function
Optional Shee, optional Wb
Views 3,545
Downloads 1,314
CodeID
DB ID
ANmarAmdeen
610
Revisions
v1.0
Friday
June
22
2018