+ Reply to Thread
Results 1 to 4 of 4

COUNTA and "" not working together

  1. #1
    Forum Contributor
    Join Date
    05-07-2007
    Location
    Singapore
    MS-Off Ver
    2006/2016
    Posts
    170

    COUNTA and "" not working together

    lets say I have this formula

    IF(A1>0,"","Negative")
    Repeated downwards from B1 to B100

    Then I use a COUNTA function:
    COUNTA(B1:B100)

    I noticed that it will count cells that are otherwise supposed to be blank.

    I do have a workaround using total number of cells minus the output from a COUNTBLANK formula [100-COUNTBLANK(B1:B100)] but just curious to know why COUNTA isn't working.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: COUNTA and "" not working together

    Hi lordfa9,

    Read the first Remark point on https://support.office.com/en-us/art...rs=en-US&ad=US

    CountA counts "" but does not count blank cells.

    Is that what you are finding is true?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: COUNTA and "" not working together

    Exactly - You want a CountIFS.

    Count if cells are NOT blank
    Please Login or Register  to view this content.
    Count if Cells ARE Blank
    Please Login or Register  to view this content.
    Now if you keep your helper columns, you can count if they are "" and Not ""
    Count of Blanks or "" in your given range
    Please Login or Register  to view this content.
    Count of Negatives in your given range
    Please Login or Register  to view this content.
    -If you think you are done, Start over - ELeGault

  4. #4
    Forum Contributor
    Join Date
    05-07-2007
    Location
    Singapore
    MS-Off Ver
    2006/2016
    Posts
    170

    Re: COUNTA and "" not working together

    Quote Originally Posted by MarvinP View Post
    Hi lordfa9,

    Read the first Remark point on https://support.office.com/en-us/art...rs=en-US&ad=US

    CountA counts "" but does not count blank cells.

    Is that what you are finding is true?

    sadly yes

    I'll try elegaut's ideas on Monday when I'm back at work

+ 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. need VBA code to open a file type then do a "=countA(A:A)-1" and close it
    By BrandonFromSingapore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2012, 12:19 PM
  2. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 PM
  3. Replies: 4
    Last Post: 06-11-2010, 02:08 PM
  4. Replies: 1
    Last Post: 10-22-2008, 09:06 AM
  5. Macro debugs at "Application.CountA" with 45.000+ rows
    By Kjaer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2007, 05:00 AM

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