Count numeric cells in a range
Macro Title:
|
Worksheet Variable:
|
Worksheet Name:
|
Range Reference:
enter the range from which you want to count only numeric cells |
Output Cell:
|
First Comment:
' |
Second Comment:
' |
Sub Count_numeric_cells_in_a_range()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count numeric cells in range (B5:C11) using the COUNT function
ws.Range("F4").Formula = "=COUNT(B5:C11)"
End Sub
Sub Count_numeric_cells_in_a_range()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'count numeric cells in range (B5:C11) using the COUNT function
ws.Range("F4").Formula = "=COUNT(B5:C11)"
ws.Range("F4").Formula = "=COUNT(B5:C11)"
End Sub