+ Reply to Thread
Results 1 to 12 of 12

Countifs without returning zero if column has only zeros

  1. #1
    Forum Contributor alexxl's Avatar
    Join Date
    04-21-2015
    Location
    Romania
    MS-Off Ver
    Micrososft Office Professional Plus 2019
    Posts
    316

    Countifs without returning zero if column has only zeros

    On column V i would like to count how many talke to agents calls i had. that means i have to count if only positive information from column i.
    But still some days it happens i only have zero informations so my count if will return zero value. I would like that my countifs to return blank in this case.

    Thank you very much in advance!

    Countif.xlsx

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,674

    Re: Countifs without returning zero if column has only zeros

    The formula in column S should be:
    Please Login or Register  to view this content.
    Last edited by popipipo; 10-13-2022 at 01:38 PM.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Contributor alexxl's Avatar
    Join Date
    04-21-2015
    Location
    Romania
    MS-Off Ver
    Micrososft Office Professional Plus 2019
    Posts
    316

    Re: Countifs without returning zero if column has only zeros

    The formula is =COUNTIFS(S:S,U2,I:I,">0") but if column i has 0 it returns 0. I think you did`t read my post.

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,674

    Re: Countifs without returning zero if column has only zeros

    If I did't read your post I could not give you a answer.
    Did you try my formula?

    Sorry I meant this:
    The formula in column S should be:
    Attached Files Attached Files
    Last edited by popipipo; 10-13-2022 at 01:40 PM.

  5. #5
    Forum Contributor alexxl's Avatar
    Join Date
    04-21-2015
    Location
    Romania
    MS-Off Ver
    Micrososft Office Professional Plus 2019
    Posts
    316

    Re: Countifs without returning zero if column has only zeros

    O nice information But still i need my case solved would you help me ? ) thank you a lot!

  6. #6
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,674

    Re: Countifs without returning zero if column has only zeros

    I think with this formula the problem is solved.

  7. #7
    Forum Contributor alexxl's Avatar
    Join Date
    04-21-2015
    Location
    Romania
    MS-Off Ver
    Micrososft Office Professional Plus 2019
    Posts
    316

    Re: Countifs without returning zero if column has only zeros

    I want to avoid 0 as a result can you help me with this? if you put 00:00 in each row of column I the result will be zero so...

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,695

    Re: Countifs without returning zero if column has only zeros

    is this what you are looking for in V2?
    =IF(COUNTIFS(S:S,U2,I:I,">0")=0,"",COUNTIFS(S:S,U2,I:I,">0"))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  9. #9
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Countifs without returning zero if column has only zeros

    You could use a number format like 0;-0;;@ to suppress displaying 0. Or use trickery like

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


    Explaining the trickery. For 1/(1/x), if x is 0, then 1/0 returns the error value #DIV/0!, and 1/(#DIV/0!) also returns #DIV/0!. On the other hand, if x is any number other than 0, 1/x is its reciprocal, so also a number; 1/(1/x) is the reciprocal of 1/x, so x itself; that is, 1/(1/x) is just x when x isn't 0. IFERROR(a,b) returns a when it's not an error value, or b when a is an error value, so IFERROR(1/(1/x),b) returns x when x isn't 0 because 1/(1/x) is just x, or b when x is 0 because when x is zero, 1/(1/x) is the #DIV/0! error value.
    Last edited by hrlngrv; 10-15-2022 at 03:50 AM. Reason: added explanation

  10. #10
    Forum Contributor alexxl's Avatar
    Join Date
    04-21-2015
    Location
    Romania
    MS-Off Ver
    Micrososft Office Professional Plus 2019
    Posts
    316

    Re: Countifs without returning zero if column has only zeros

    Sam Caprici Could you explain me a little bit how this formula works. thank you guys!
    Last edited by alexxl; 10-14-2022 at 10:09 AM.

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,695

    Re: Countifs without returning zero if column has only zeros

    The countif formula I gave you is simply incorporating an IF statement into it, saying the following.
    first, count items in col S that match what is in cell U2 and items in col I that are greater than 0.
    second, the IF statement is saying that if there are no items meeting both criteria in the countif statement, in other words, there are none or 0, since you don't want a 0 returned, make the outcome be blank, but if there are, then return the count of those items (the second countif statement).

    hope that helps.
    Last edited by Sam Capricci; 10-14-2022 at 11:05 AM.

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,695

    Re: Countifs without returning zero if column has only zeros

    I gave you an explanation in post #11. AND thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. COUNTIFS produces only zeros
    By phavlin in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-27-2022, 11:42 AM
  2. [SOLVED] Count Cells Excluding Blanks, Zeros, and Formulas Returning Zeros
    By Saradomin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-10-2022, 05:14 AM
  3. COUNTIFS returning Zeros
    By NewYears1978 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-30-2021, 10:17 AM
  4. [SOLVED] Returning Zeros as blanks but not at Midnight!
    By m1cks in forum Excel General
    Replies: 3
    Last Post: 02-21-2020, 03:36 AM
  5. Countifs Zeros
    By rmccain in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2016, 10:13 AM
  6. [SOLVED] Excel returning zeros (it shouldn't be)
    By Doctor Dre in forum Excel General
    Replies: 10
    Last Post: 06-15-2015, 12:20 PM
  7. Macro to Hide the whole row if formulas in column L are returning zeros
    By mirving in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-20-2013, 03:55 PM

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