+ Reply to Thread
Results 1 to 6 of 6

WorksheetFunction.CountA not working

  1. #1
    Forum Contributor timtim89's Avatar
    Join Date
    01-05-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    141

    WorksheetFunction.CountA not working

    Hey there,

    What I try to do is following: When the macro is run, I wish to exit the macro if countA(C:C)>countA(D:D) and otherwise continue.. Following code is for some reason not counting right the number of cells with values, cause it reaches the "Else" part every time, even thought c > d. Tried a couple of stuff to avoid the problem, but didn't succeed. Does anyone know what Im doing wrong? Thanks a lot!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480

    Re: WorksheetFunction.CountA not working

    You never gave the range to count.

    Please Login or Register  to view this content.
    this will get the same results
    Please Login or Register  to view this content.
    Last edited by davesexcel; 04-02-2012 at 07:33 AM.

  3. #3
    Forum Contributor timtim89's Avatar
    Join Date
    01-05-2012
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010
    Posts
    141

    Re: WorksheetFunction.CountA not working

    Aha that makes sense. Work great now thanks

  4. #4
    Forum Contributor
    Join Date
    12-28-2015
    Location
    US
    MS-Off Ver
    365
    Posts
    133

    Re: WorksheetFunction.CountA not working

    trying to get the below to work and seems to be acting up.

    Please Login or Register  to view this content.
    thanks in advance!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: WorksheetFunction.CountA not working

    Quote Originally Posted by Excel4444 View Post
    trying to get the below to work and seems to be acting up.

    Please Login or Register  to view this content.
    thanks in advance!
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Contributor
    Join Date
    12-28-2015
    Location
    US
    MS-Off Ver
    365
    Posts
    133

    Re: WorksheetFunction.CountA not working

    Sure thing. Thank you. I start a new one.

+ Reply to Thread

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