Good morning everybody,
This is my code:
Dim Avrg As ????
Avrg = WorksheetFunction.Average(LS)
Dim FirstQ As ????
FirstQ = WorksheetFunction.CountIf(LS, "< " & Avrg)
Where LS is a Range of numbers with, usually, a lot of decimals. Using Variant to define Avrg (thats is simply the mean of LS) i obtain what im looking for (ex: 0,78271728392). BUT the problem is that when i use Avrg in the countif function i always obtain 0 (zero). The question is: Which type of variables I have to use in order to count LS without loosing decimals in the variable Avrg? (ex: Integer works but rounding 0,78271728392 in 1 is not what i want ).
Thank you
Bookmarks