Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Count certain values in numeric array

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
avi - 23 Mar 2008 21:38 GMT
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 - 23 Mar 2008 21:42 GMT
for "3":

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

> Hello,
>
[quoted text clipped - 5 lines]
> Thanks
> avi
Jarek Kujawa - 23 Mar 2008 22:06 GMT
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

> Hello,
>
[quoted text clipped - 5 lines]
> Thanks
> avi
Alan Beban - 23 Mar 2008 23:47 GMT
> Hello,
>
[quoted text clipped - 5 lines]
> 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 - 24 Mar 2008 09:02 GMT
great utility!

Thanks
Avi
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.