ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   countif, blank if zero (https://www.excelbanter.com/excel-worksheet-functions/177526-countif-blank-if-zero.html)

eugene

countif, blank if zero
 
Hi,

When countif does not find any occurrences, it writes "0". Is there anyway
to change that so that it writes nothing - leaves a blank)?

--
eugene

Fay Roberts

countif, blank if zero
 
=IF(COUNTIF([whatever])0, COUNTIF([whatever]), "") should do the trick;
don't know if there's a more elegant way than that.

"eugene" wrote:

Hi,

When countif does not find any occurrences, it writes "0". Is there anyway
to change that so that it writes nothing - leaves a blank)?

--
eugene


eugene

countif, blank if zero
 
that was quick. thanks

--
eugene


"Fay Roberts" wrote:

=IF(COUNTIF([whatever])0, COUNTIF([whatever]), "") should do the trick;
don't know if there's a more elegant way than that.

"eugene" wrote:

Hi,

When countif does not find any occurrences, it writes "0". Is there anyway
to change that so that it writes nothing - leaves a blank)?

--
eugene


Fay Roberts

countif, blank if zero
 
You're welcome! I was about to post my own query and thought "Oooh, I know
the answer to *that* one...!"

F

"eugene" wrote:

that was quick. thanks

--
eugene


"Fay Roberts" wrote:

=IF(COUNTIF([whatever])0, COUNTIF([whatever]), "") should do the trick;
don't know if there's a more elegant way than that.

"eugene" wrote:

Hi,

When countif does not find any occurrences, it writes "0". Is there anyway
to change that so that it writes nothing - leaves a blank)?

--
eugene



All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com