ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   using the countif function (https://www.excelbanter.com/excel-worksheet-functions/187317-using-countif-function.html)

harrimanxix

using the countif function
 
Hi All
im using the countif function to add up all the cells in a range that
contain the Letter D the formula works but the problem im having is that if
there is on D in the range then the formula returns the 0 (zero) value how do
i get it to just leave the cell blank ??? ps ive tries addin ,"") this does
not work

cheers guys or gals

AKphidelt

using the countif function
 
Just wrap the formula around in an If statement like

=If(Countif(yourrange,"D")=0,"",Countif(yourrange, "D"))

"harrimanxix" wrote:

Hi All
im using the countif function to add up all the cells in a range that
contain the Letter D the formula works but the problem im having is that if
there is on D in the range then the formula returns the 0 (zero) value how do
i get it to just leave the cell blank ??? ps ive tries addin ,"") this does
not work

cheers guys or gals


RagDyeR

using the countif function
 
One way:

=IF(COUNTIF(B1:B100,"D"),COUNTIF(B1:B100,"D"),"")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"harrimanxix" wrote in message
...
Hi All
im using the countif function to add up all the cells in a range that
contain the Letter D the formula works but the problem im having is that
if
there is on D in the range then the formula returns the 0 (zero) value how
do
i get it to just leave the cell blank ??? ps ive tries addin ,"") this
does
not work

cheers guys or gals





All times are GMT +1. The time now is 07:14 AM.

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