+ Reply to Thread
Results 1 to 6 of 6

How COUNTA deals with blanks and arrays

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    804

    How COUNTA deals with blanks and arrays

    Hi, I have attached a workbook with a few examples which I hope will show the problem,

    my starting point i s;

    Please Login or Register  to view this content.
    but if a #NA i returned I get a count of 1 , so I put in if na = "" , still a count of 1, so I tried ;

    Please Login or Register  to view this content.
    which works for a false but true = a spilled count so eg 20 for each value of the array ?

    in the finished example i have a vstack which seems to get rid of the problem, but I might not want that so is there a way around this.
    I have included several example if more need let me know.

    Richard.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: How COUNTA deals with blanks and arrays

    Because it's counting the error as a text item.

    Try this:

    Please Login or Register  to view this content.
    Last edited by AliGW; 09-21-2024 at 01:29 PM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2505 and WPS V2024(12.1.0.18543)
    Posts
    4,113

    Re: How COUNTA deals with blanks and arrays

    Please refer to other methods
    Cell H4 formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    OR office 365
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    804

    Re: How COUNTA deals with blanks and arrays

    Thank you both I have not properly gone through both just yet,
    but did come up with this; which sort of avoids the counting problem by using the ifna at the end and is at first glance similar to aligw, I think?
    Please Login or Register  to view this content.
    updated file attached.

    Richard.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,790

    Re: How COUNTA deals with blanks and arrays

    Thanks for the rep.

  6. #6
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    China Shanghai
    MS-Off Ver
    365 V2505 and WPS V2024(12.1.0.18543)
    Posts
    4,113

    Re: How COUNTA deals with blanks and arrays

    @Dicken You're Welcome. Glad to help . Thank You for the feedback and rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem with blanks counted in CountA
    By phkc070408 in forum Excel General
    Replies: 6
    Last Post: 09-29-2023, 04:15 AM
  2. Offset with CountA subtotal Not counting bottom rows or blanks
    By wetgoose69 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-29-2020, 11:17 AM
  3. [SOLVED] Using COUNTA to count a range but exclude blanks and 0.00
    By OverKnight in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-24-2018, 03:47 PM
  4. Counting non-blanks (CountA) of a matching cell's row
    By hawaean in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2017, 07:34 AM
  5. [SOLVED] Using COUNTA to Eliminate Blanks in a Drop Down List?
    By qanjorin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-17-2016, 07:28 PM
  6. [SOLVED] Handling blanks that can be blanks or 0s in arrays
    By Vaslo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-26-2013, 09:52 AM
  7. [SOLVED] Count blanks or counta
    By bopsgtir in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-15-2012, 01:43 PM

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