COUNTIF/COUNTA Formula

safetyadvisor

New member
Joined
Feb 14, 2017
Messages
2
Reaction score
0
Points
0
Hello I was hoping someone could help me....
I am making a scorecard for vehicle inspections (completed/or not completed) for a safety program that has checkmarks and X's. At the end of my row I am calculating the percentage completed for each vehicle. So for a check mark they receive 100% and for an X they get 0% (columns with green checkmark at the top) and averaging the total to get the whole teams running percentage (shown highlighted in yellow).
Excel Issue.jpg
The formula I am using is =COUNTIF/COUNTA see picture attached for a snapshot of my spreadsheet. The issue I am having is that I get the #DIV/0! error in my box when I haven't entered any data yet (checkmark or x). See attached picture Evaluate Formula.
Evaluate Formula.JPG
I should mention that the origin of my checkmarks and x's are from Arial Unicode MS (2713(checkmark) 2715(X)). I had to use text symbols since I wanted dropdown boxes in each of my boxes (to choose a checkmark or a X) and if you use Webdings it does not show up as a checkmark or X.

My question is how do I get rid of the error and display 0% when no data has been entered?

Thank you so much
 
how do I get rid of the error and display 0% when no data has been entered?
You can use the IFERROR() to return something in place of the defaults Excel uses to report formula errors. You simply wrap this function around your formula like so:
=IFERROR(COUNTIF(A1:A100,C1),0)

So.... the IFERROR extension executes my formula, COUNTIF(A1:A100,C1) and returns 0 if it ends in error instead of the default error message.
 
Back
Top