+ Reply to Thread
Results 1 to 2 of 2

COUNTA Ignore Formulas

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-13-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2015
    Posts
    183

    COUNTA Ignore Formulas

    Hello,
    I am trying to write a COUNTA formula that excludes blank cells.
    I searched this forum and found that
    =SUMPRODUCT(--(A1:A100<>""))
    does just that.

    My question is what relevance does the "--" have?

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

    Re: COUNTA Ignore Formulas

    It is the double unary operator and is used to coerce Booleans (True/False) to their integer equivalents (1/0 respectively)

    You might find you can achieve the same results using :

    =ROWS(A1:A100)-COUNTBLANK(A1:A100)

    Or, alternatively if there's some consistency in the formula results...

    Always Text: =COUNTIF(A1:A100,"?*")

    Always Number: =COUNT(A1:A100)

+ 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