ag5 =COUNTIF(C5:AF5,"P")+COUNTIF(C5:AF5,"P/2")/2+COUNTIF(C5:AF5,"L")+COUNTIF(C5:AF5,"L/2")
ah5 =IF(OR(E5="P",E5="p/2",G5="p",G5="p/2"),1,0)+IF(OR(L5="P",L5="p/2",N5="p/2",N5="P"),1,0)
+IF(OR(N5="P",N5="p/2",R5="p/2",R5="P"),3,0)+IF(OR(S5="P",S5="p/2",U5="p/2",U5="P"),1,0)
+IF(OR(Z5="P",Z5="p/2",AB5="p/2",AB5="P"),1,0)
ai5 =AG5+AH5
ak5 =AJ5/30*AI5
AL(Total Leave) =COUNTIF(C5:AF5,"L")+COUNTIF(C5:AF5,"L/2")/2
Note
1. here we can use P (Present), P/2 (half Duty), L (Leave), L/2 (half Duty & half leave), A (Apsent), LW (Leave without Pay)
2. hide formula select cell, ctrl+1, Protection, Check Hidden
3. were we want edit go to Tool, Protection, allow uses to edit ranges
4.Protect sheet go to tool, Protection, Protect sheet
Thanks Shailendra Kumar Singh
Sure we can win...