Hello, I have some code that will loop through each worksheet in my workbook and then fetch the amount of rows and populate integer 'rowcount' with that number. How do I then take that integer, store all of those values in an array and then transpose that array onto a range so it looks something like this?
Where all the values are the number of rows on the worksheet and the worksheet name is titled above that value (as shown above). The worksheets are all in the same order as above.
Where all the values are the number of rows on the worksheet and the worksheet name is titled above that value (as shown above). The worksheets are all in the same order as above.
VBA Code:
Sub Totals()
Dim wrksheet As Worksheet
Dim x As Long
Dim rowcount As Integer
For Each wrksheet In ActiveWorkbook.Worksheets
If wrksheet.Visible And Not wrksheet.Name = "Log" Then
With wrksheet
rowcount = .Range("B2", .Range("B" & .Rows.Count).End(xlUp)).Rows.Count
End With
End If
Next wrksheet
End Sub