Results 1 to 3 of 3

Counting number of cells with non zero value

This is a discussion on Counting number of cells with non zero value within the Excel Questions forums, part of the Question Forums category; Hi, consider the following table: A1, A2, A3, A4 Count, value1, value2, value3 ...x..., 12345, 23423, 0 ...y..., 0, 324234234, ...

  1. #1
    New Member
    Join Date
    Aug 2010
    Posts
    13

    Default Counting number of cells with non zero value

    Hi,

    consider the following table:

    A1, A2, A3, A4
    Count, value1, value2, value3
    ...x..., 12345, 23423, 0
    ...y..., 0, 324234234, 0

    How to count the number of cells containing non-zero values in a row?

    X should be 2 and Y should be 3.

    It is easy to check the validity of on cell like : =IF(A2>0,"1","0").

    But how to extend the range where the check has to be done, like (A2:A4).

    Pls help,
    Thanks

  2. #2
    Board Regular Domski's Avatar
    Join Date
    Jan 2005
    Location
    Leeds, UK
    Posts
    7,178

    Default Re: Counting number of cells with non zero value

    =COUNTIF(A2:A4,">"&0)

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    - Guidelines For Posting

    - Mr Excel Articles and PodCasts

    - Display sheet using HTML Maker or Excel Jeanie

    - Something that makes me laugh

    - Please try to remember to use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    New Member
    Join Date
    Aug 2010
    Posts
    13

    Default Re: Counting number of cells with non zero value

    Quote Originally Posted by Domski View Post
    =COUNTIF(A2:A4,">"&0)

    Dom
    Thanks Dom, that was quick and it works perfectly...

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com