+ Reply to Thread
Results 1 to 5 of 5

How do I use countif to count values excluding blank cells

  1. #1
    Glenda
    Guest

    How do I use countif to count values excluding blank cells

    I am trying to get the percentage of 1's in a column excluding blank cells

    A B
    1 1 0
    2 1 1
    3
    4 0

    I know the formula would be =countif(a1:a4,1) answer would be 2 but, how do
    I get the percent of the #1's with including blank cells.

  2. #2
    Dave Peterson
    Guest

    Re: How do I use countif to count values excluding blank cells

    =countif(a1:a4,1)/count(a1:a4)

    =count() returns the number of numbers in the range.

    Glenda wrote:
    >
    > I am trying to get the percentage of 1's in a column excluding blank cells
    >
    > A B
    > 1 1 0
    > 2 1 1
    > 3
    > 4 0
    >
    > I know the formula would be =countif(a1:a4,1) answer would be 2 but, how do
    > I get the percent of the #1's with including blank cells.


    --

    Dave Peterson

  3. #3
    Glenda
    Guest

    Re: How do I use countif to count values excluding blank cells

    Okay, now what If I want to exclude the blank cell in a3

    "Dave Peterson" wrote:

    > =countif(a1:a4,1)/count(a1:a4)
    >
    > =count() returns the number of numbers in the range.
    >
    > Glenda wrote:
    > >
    > > I am trying to get the percentage of 1's in a column excluding blank cells
    > >
    > > A B
    > > 1 1 0
    > > 2 1 1
    > > 3
    > > 4 0
    > >
    > > I know the formula would be =countif(a1:a4,1) answer would be 2 but, how do
    > > I get the percent of the #1's with including blank cells.

    >
    > --
    >
    > Dave Peterson
    >


  4. #4
    Dave Peterson
    Guest

    Re: How do I use countif to count values excluding blank cells

    Since the cell is empty, it won't be included in the =countif() and it won't be
    included in the =count().

    In fact, all non-numeric entries would be excluded from the =count() portion.

    Am I missing something?



    Glenda wrote:
    >
    > Okay, now what If I want to exclude the blank cell in a3
    >
    > "Dave Peterson" wrote:
    >
    > > =countif(a1:a4,1)/count(a1:a4)
    > >
    > > =count() returns the number of numbers in the range.
    > >
    > > Glenda wrote:
    > > >
    > > > I am trying to get the percentage of 1's in a column excluding blank cells
    > > >
    > > > A B
    > > > 1 1 0
    > > > 2 1 1
    > > > 3
    > > > 4 0
    > > >
    > > > I know the formula would be =countif(a1:a4,1) answer would be 2 but, how do
    > > > I get the percent of the #1's with including blank cells.

    > >
    > > --
    > >
    > > Dave Peterson
    > >


    --

    Dave Peterson

  5. #5
    PCLIVE
    Guest

    Re: How do I use countif to count values excluding blank cells

    I thought maybe something like:

    =COUNTIF(A1:A4,A1)/COUNTA(A1:A4)


    "Glenda" <[email protected]> wrote in message
    news:[email protected]...
    > Okay, now what If I want to exclude the blank cell in a3
    >
    > "Dave Peterson" wrote:
    >
    >> =countif(a1:a4,1)/count(a1:a4)
    >>
    >> =count() returns the number of numbers in the range.
    >>
    >> Glenda wrote:
    >> >
    >> > I am trying to get the percentage of 1's in a column excluding blank
    >> > cells
    >> >
    >> > A B
    >> > 1 1 0
    >> > 2 1 1
    >> > 3
    >> > 4 0
    >> >
    >> > I know the formula would be =countif(a1:a4,1) answer would be 2 but,
    >> > how do
    >> > I get the percent of the #1's with including blank cells.

    >>
    >> --
    >>
    >> Dave Peterson
    >>




+ 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