LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Replacement for Dsum - calling countif from aVBA

A common problem I find is that the very useful D* worksheet functions
require two rows in order to specify their ctiteria. This is fine
until you want to put on on every line in a big report.

For years I've put up with this, but recently decided to write my own
funciton in VBA with a nicer criteria specifiction model (one which
uses at most one line).

In order to provide a rich set of test operators (and also to keep
consistency with the D* functions) I have written my function to
actually use worksheetfunction.countif() to do the actual comparison.

My function merrily goes down the input range using countif to select
cells, then I do with them what I will and return a result.

So far, so good.

Except for very large datasets it all goes a bit slowly.

Now - to the question:

One standard way to get VBA functiuons which operate on a large dataset
to run quiker is to assign the range to a variant (array) at first, and
then use the array. This cuts out he continual spreadsheet conversion.

BUT

worksheetfunction.countif() requires a range as its input parameter.

Anybody got any clever ideas?

 
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
#N/A Replacement Susana C via OfficeKB.com Excel Discussion (Misc queries) 2 December 29th 06 05:06 PM
DDE Replacement? Mark Excel Programming 1 September 10th 06 05:30 AM
Replacement T De Villiers[_47_] Excel Programming 0 July 21st 06 03:53 PM
Replacement T De Villiers[_48_] Excel Programming 0 July 21st 06 03:53 PM
Replacement T De Villiers[_46_] Excel Programming 0 July 21st 06 03:53 PM


All times are GMT +1. The time now is 09:25 PM.

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

About Us

"It's about Microsoft Excel"