+ Reply to Thread
Results 1 to 5 of 5

Any way to speed up countif for range?

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Any way to speed up countif for range?

    Hello!
    In the attached spreadsheet, you'll see two sheets with data. In the first sheet, I'm trying to run a very simple countif, looking for the number of instances of a ticker symbol on the second tab, called "DL_Data".
    The code I'm using to do this is below:

    Please Login or Register  to view this content.
    This calculation takes approximately 40 seconds to complete, but this one is just a sample of about 5 more that need to be done across several other tabs. I've tried turning autocalc on and off, screen updating is off, etc.

    Do any of you know a faster way to do this? FYI, I'm TERRIBLE with arrays - have a mental block against them, but am more than willing to try if you think there will be a significant improvement in the speed here.

    For what it's worth, I'm using Excel 2007.

    Thanks for any help!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Any way to speed up countif for range?

    You take the whole column (A) to look in it.

    If you can shorten the range in e.g: A1:A800 uit wil be faster.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Any way to speed up countif for range?

    oeldere - Thank you... that took care of it. Appreciate the solution!

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Any way to speed up countif for range?

    Glad I could help. Thanks for the reply.

    If the question is solved, will you mark your question as solved?

    If you have (other) questions, on this item, just ask.

  5. #5
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Any way to speed up countif for range?

    Been a while since I've resolved a thread here, so it took me a while to figure out where to do it! Thanks again, and have a great day!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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