Count number of columns in a range

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

'
Second Comment:

'
Sub Count_number_of_columns_in_range()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the total number of columns in a specific range
ws.Range("B5") = ws.Range("E5:K7").Columns.Count

End Sub

Sub Count_number_of_columns_in_range()
'declare a variable

Dim ws As Worksheet

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

ws.Range("B5") = ws.Range("E5:K7").Columns.Count

End Sub

Sub Count_number_of_columns_in_range()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count the total number of columns in a specific range
ws.Range("B5") = ws.Range("E5:K7").Columns.Count

End Sub