+ Reply to Thread
Results 1 to 5 of 5

Counting empty cells

  1. #1
    Forum Contributor
    Join Date
    06-24-2009
    Location
    Germany, MG
    MS-Off Ver
    Excel 2010
    Posts
    131

    Counting empty cells

    Ok folks, this seems to be a trivial thing (and it probably is), but I encountered the following issue:

    In a countifs formula I have one criterium that shall tell excel to count only cells that are not empty. I used this formula:

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


    Let's say it does something, but it doesn't give me the "right" result (I checked by setting filters).

    While investigating this I tried the following to formulas:

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

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

    To my understanding these to formulas should have mutually exclusive results.
    In fact formula one returns 200.932, formula 2 returns 48.908. (As you can see from the range, there is a total of 200.932 cells).

    Can you explain, what exactly "<>" does? In this example it counts cells as non-empty, even though there are definitely empty cells.
    I have an example sheet where I used the countifs formula from above and it works...

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Counting empty cells

    Cunner, you need to put the = sign OUTSIDE the "".

    EQUALS BLANK: =""
    EQUALS NOT BLANK: <>""

    Hope this helps.



    EDIT: Put the equals or the not equals sign (<>) outside (before) the "".

    EDIT # 2: I've just noticed you're using countif, not if - I apologise for any confusion I've caused, and am going for a coffee to help kick-start my head before I get anything else wrong. Sorry, Cunner.
    Last edited by BB1972; 03-28-2013 at 05:09 AM.
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Counting empty cells

    In excel blanks that are derived from formulas, an if statement for example (;"") are not considered true blanks since there is a formula in the cell.
    The cell shows nothing, but there is something there.

    The countblank formula though, was designed to include the derived blanks as blanks, the countif wont.

    You can combine both your formulas to get what you want

    Please Login or Register  to view this content.
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  4. #4
    Forum Contributor
    Join Date
    06-24-2009
    Location
    Germany, MG
    MS-Off Ver
    Excel 2010
    Posts
    131

    Re: Counting empty cells

    Thank you Portuga.
    Point is, that there isn't even a formula in the respective empty cells...

    I will try to adapt your solution, though.

  5. #5
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Counting empty cells

    As a test try the following: (this will also give you the results)

    Create a pivot table . Range I1:I200934 (I1 as the field title)

    Put the field in both the total section and the row section of the pivot.

    The pivot will make the difference between true blanks and derived blanks. You can use this method to see exactly what the range has in terms of blanks.

    If you then tick out the blanks, the pivot will give the total of non blanks.
    Last edited by Portuga; 03-28-2013 at 05:55 AM.

+ 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