Skip to content

Instantly share code, notes, and snippets.

Sub 全シート行数カウント()
Dim sheetname As String
Dim i As Integer
For i = 1 To ThisWorkbook.Sheets.Count
sheetname = ThisWorkbook.Sheets(i).Name
ActiveCell = "=CountA('" & sheetname & "'!G6:G65535)"
ActiveCell.Offset(1, 0).Activate
Next
End Sub