+ Reply to Thread
Results 1 to 8 of 8

Count all cell that are non-blank and non-zeros

  1. #1
    Registered User
    Join Date
    05-09-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    56

    Count all cell that are non-blank and non-zeros

    Hello,

    I need to count all of the non blank and non zero cells in a range

    A b c d e
    0 2 3 0

    So for the above example the count should be 2.


    Thanks,
    LL

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count all cell that are non-blank and non-zeros

    =countif(a1:e1,">0")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Count all cell that are non-blank and non-zeros

    hi LL, welcome to the forum. if you want to also include -ve numbers, then:
    =SUMPRODUCT(--(A1:E1<>0))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    05-09-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: Count all cell that are non-blank and non-zeros

    Hi Benish,
    your fomular counts blank cells. How can i count only the nonblank and non zero cells. The numbers will include negative (-1,-2) number that needs to be counted as well.

    Quote Originally Posted by benishiryo View Post
    hi LL, welcome to the forum. if you want to also include -ve numbers, then:
    =SUMPRODUCT(--(A1:E1<>0))

  5. #5
    Registered User
    Join Date
    05-09-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: Count all cell that are non-blank and non-zeros

    Ho Fortis,
    Your dont count is perfect if it counted negative numbers. ??
    Quote Originally Posted by Fotis1991 View Post
    =countif(a1:e1,">0")

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Count all cell that are non-blank and non-zeros

    unless your cell contains a formula that returns "", my formula should work. to be safe, you can add:
    =SUMPRODUCT((A1:E1<>0)*(A1:E1<>""))

  7. #7
    Registered User
    Join Date
    05-09-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    56

    Re: Count all cell that are non-blank and non-zeros

    Thanks.. Yes it worked after i cleared all the cell and redid.

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count all cell that are non-blank and non-zeros

    Quote Originally Posted by buwa84 View Post
    Ho Fortis,
    Your dont count is perfect if it counted negative numbers. ??
    Fool me your example. It was only with positive numbers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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