Question Google Sheets Help - Countif Function not working with Data Validation

Apr 15, 2021
1
0
10
Hi all,

I am creating an absent tracker for my department and have stumbled across an issue. I would like to keep track of the total amount of sick leave, dependency leave and compassionate leave days for the year. I would also like to include half days (AM/PM).

I have tried the following formula

=COUNTIF(C2:G2,"S")+((COUNTIF(C2:G2,"SAM")+COUNTIF(C2:G2,"SPM")+COUNTIF(C2:G2,"DL")+COUNTIF(C2:G2,"DL-AM")+COUNTIF(C2:G2,"DL-PM")+COUNTIF(C2:G2,"CL")+COUNTIF(C2:G2,"CL-AM")+COUNTIF(C2:G2,"CL-PM"))/2)

This formula reports some of the entries as 1 and 0.5. However, a few just show as 0.5 instead of 1 or vice versa?

Please find the sample worksheet link below

https://docs.google.com/spreadsheets/d/1vNkLueL-OSFgbkpsr7yPaedM55-HFqCUoKw9X4LENTg/edit?usp=sharing

Any help would be much appreciated

Thank you
 

Ralston18

Titan
Moderator
I do not have a google account and generally do not download posted spreadsheets etc. anyway....

Do a screen capture(s) of the sample worksheet and post via imgur.

= = = =

As I understand your design you have 9 (nine) leave classifications horizontally listed with entries being made by classification from cells C2 toG2.

S, SAM, SPM, DL, DL-AM, DL-PM, CL, CL-AM, CL-PM

Five columns.

In the formula take a close look at the use/placement of parenthesis and their pairings and nestings.