Count number of rows in a range

Macro Title:
Worksheet Variable:
Worksheet Name:
Range Reference:
Output Cell:
First Comment:

'
Second Comment:

'
Sub Count_number_of_rows_in_range()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the total number of rows in a specific range
ws.Range("B5") = ws.Range("E5:E15").Rows.Count

End Sub

Sub Count_number_of_rows_in_range()
'declare a variable

Dim ws As Worksheet

Set ws = Worksheets("Analysis")
'count the total number of rows in a specific range

ws.Range("B5") = ws.Range("E5:E15").Rows.Count

End Sub

Sub Count_number_of_rows_in_range()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the total number of rows in a specific range
ws.Range("B5") = ws.Range("E5:E15").Rows.Count

End Sub