IF and COUNTIF function

New Contributor

Urgent help needed. What's the best formula if I have several conditions? I have an Attendance tracker for the entire month.

 

 CONDITIONS          
ATTENDANCEA, NCNS If trainee has A or NCNS for the month of March, count how many instance, if 0, leave it blank. 
PUNCTUALITYL, OB, UT If trainee has L, OB, or UT for the month of March, count how many instance, if 0, leave it blank. 
2 Replies
By the way, I used this formula but it's not giving me the correct result.
=IF(COUNTIF(Attendance!C3:IU3{"A","NCNS"}),COUNTIF(Attendance!C3:IU3,"A")+COUNTIF(Attendance!C3:IU3,"NCNS"),"")

@yana_1012 Try this one:

=SUM(COUNTIF(Attendance!C3:IU3,{"A","NCNS"}))

 

Entered the above formula in a mock-up and it seem to work as intended. See attached.