MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Divide by 0 errors using countif


Posted by Lewis on January 08, 2002 4:54 PM

Hey can anyone help me, I'm using the counfif function, I had to get help when I started using it and now I have come back to revisit the project and I have forgotten what I was told. I know that there is some keystroke or somthing you have to do once you have entered your countif function into a cell to stop it outputting the divide by 0 error, but I can't remember what it is and the Microsoft help file is useless.

thanks to anyone who can help

-Lewis


Posted by paul johnson on January 08, 2002 5:32 PM

you want to use the iserror function with the countif.

If you send me a sample of the data I will give you a better example formula

if (iserror(countif(Range:range,Criteria),0,countif(Range:range,Criteria)))


PJ

Posted by Lewis on January 09, 2002 4:47 PM

Hey PJ thanks for the help with this one, but I was sure there was just a keystroke or somthing that you had to do besides just pressing enterwhen you were done editing it...

can any one help me with this one, because I can't seem to get PJ's method to work
Thanks guys

-Lewis