Results 1 to 17 of 17

Storing CountIfs arguments in an array?

Threaded View

  1. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Storing CountIfs arguments in an array?

    Quote Originally Posted by fomoz
    i understand your point. doing Evaluate is not an option though (performance considerations). thanks!
    Are you implying that:

    Sub Example()
       Debug.Print [COUNTIFS(A1:A10,"x",B1:B10,"y")]
    End Sub
    is going to be noticeably slower than:

    Sub Example()
        Debug.Print WorksheetFunction.CountIfs(Range("A1:A10"),"x",Range(B1:B10),"y")
    End Sub
    If the difference between the two in performance terms is a very real concern for you then I'm afraid you have "much bigger fish to fry" than worrying about the COUNTIFS element of your model.

    edit:
    If you're running mass COUNTIFS with huge precedent ranges and want to optimise then you should consider (if not already)

    a) minimising precedent ranges as much as possible

    b) using/automating intermediate Pivots and GETPIVOTDATA for results

    option b) may seem bizarre but the performance gains can be immense
    Last edited by DonkeyOte; 02-16-2011 at 04:51 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1