I am trying to create a function that will count how many numbers are in a range on an excel sheet, and also between a min and a max number that are also on the excel sheet (Without using any excel formulas, Ex. countif). The range on the excel sheet also includes empty and non numeric texts. Fairly new to programming so i'm having a hard time setting it up
What i have so far is:
Function Countbetween(values As Variant)
Dim N As Variant
Dim totalbetween As Single
Dim counter As Integer
For Each N In values
If N.IsNumeric = True Then 'and great than minimum and less than maximum number
counter = counter + 1
End If
Next
End Function
What i have so far is:
Function Countbetween(values As Variant)
Dim N As Variant
Dim totalbetween As Single
Dim counter As Integer
For Each N In values
If N.IsNumeric = True Then 'and great than minimum and less than maximum number
counter = counter + 1
End If
Next
End Function