ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count certain values in numeric array (https://www.excelbanter.com/excel-programming/408199-count-certain-values-numeric-array.html)

avi

Count certain values in numeric array
 
Hello,

I have an array (Array1) of values derived from an Excel range

Is there some function for knowing the number of items smaller than a
certain value without looping (something like CountIf for a range)?

Thanks
avi

Jarek Kujawa[_2_]

Count certain values in numeric array
 
for "3":

Application.WorksheetFunction.CountIf(Selection, "<" & 3)



On 23 Mar, 21:38, avi wrote:
Hello,

I have an array (Array1) of values derived from an Excel range

Is there some function for knowing the number of items smaller than a
certain value without looping (something like CountIf for a range)?

Thanks
avi



Jarek Kujawa[_2_]

Count certain values in numeric array
 
sorry but i can't think of any solution that does not loop through an
array

to me you HAVE to loop through an array


On 23 Mar, 21:38, avi wrote:
Hello,

I have an array (Array1) of values derived from an Excel range

Is there some function for knowing the number of items smaller than a
certain value without looping (something like CountIf for a range)?

Thanks
avi



Alan Beban[_2_]

Count certain values in numeric array
 
avi wrote:
Hello,

I have an array (Array1) of values derived from an Excel range

Is there some function for knowing the number of items smaller than a
certain value without looping (something like CountIf for a range)?

Thanks
avi


Not sure what you mean by "without looping"; but if the functions in the
freely downloadable file at http://home.pacbell.net/beban are available,
without having to code the looping (because it's built in to the
function), you could use

=ArrayCountIf(myArray, certainvalue, "<")

Alan Beban

avi

Count certain values in numeric array
 
great utility!

Thanks
Avi


All times are GMT +1. The time now is 01:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com