LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default The fastest way to count values in a range

Hello,

I'm writing an application that counts values in a large selection if
they comply to a crieria of greater than Firstvalue and smaller than
secondvalue .

The selection could be a huge Excel range, so that the speed is a very
important factor.

I use a procedure like:

For Each cell In Selection
If cell.Value <= secondvalue And cell.Value = Firstvalue
Then R = R + 1
Next cell

Is it the fastest way or are there better ones (Excel functions?)

All the data are numeric

Thanks a lot
Avi

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Max values in a range Brian Excel Worksheet Functions 6 September 20th 08 02:04 PM
Fastest way to select large range (e.g. B3:F1002)? [email protected] Excel Discussion (Misc queries) 7 August 31st 07 04:36 PM
What is the fastest way to copy a range to a 2D array? equiangular Excel Programming 10 February 12th 07 02:25 PM
fastest sorting routine for 2-D array of long values RB Smissaert Excel Programming 8 May 6th 06 05:06 PM
Count the how many different values in a range beechum1 Excel Worksheet Functions 3 February 12th 06 06:45 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"