Question : How do I add a .5 value to a CountIf statement?

I have the formula =(COUNTIF($C$9:$AG$9,"s")+(COUNTIF($C$9:$AG$9,"a")*(COUNTIF($C$9:$AG$9,"h")-0.5))).

This spreadsheet should count the total number of days an employee is absent.  You enter s for sick days, a for absent days or h for half day.  The formula will count all of the days, but it subtracts .5 from the total count, not just the ones with an h.  I want it to subtract .5 from the half day count so it will only subtract .5 to the half day entered.  

Example: if I enter 1 a, 2 s and 3 h - it should count: 4.5.  The formula I used above counts 5.5.

Answer : How do I add a .5 value to a CountIf statement?

Sorry, missed a parenthesis, should be

=COUNTIF($C$9:$AG$9,"s")+COUNTIF($C$9:$AG$9,"a")+COUNTIF($C$9:$AG$9,"h")/2

barry

Random Solutions  
 
programming4us programming4us