Sub 個数を数える_最終行利用() 最終行 = Cells(Rows.Count, "A").End(xlUp).Row 会社数 = 最終行 - 1 '項目名1行目の1を引いている MsgBox "会社数:" & 会社数 & "社" End Sub