Hi
I am trying to count Half Days & Full Days in Attendance but have problems doing that. SL/P is Sick Leave Half Day, EL/P is Earned Leave Half Day & CO/P is Compensation Off Half Day. I tried the below formula
=(COUNTIF(I123:AM123,"P")+(COUNTIF(I123:AM123,{"SL/P","EL/P","CO/P"})/2))
(P = Present Days)
Here SL/P is in first place, EL/P is in second place & CO/P is in third place.
Imagine if CO/P leave is mentioned in the row, but this formula does not recognise it and counts only present days. If i bring CO/P in first position in the formula only then it recognises and counts the present days & the half day. Every time i have to change the position of the Half Day to first in order to be recognised & counted.
Real Situation Example :
1.
=(COUNTIF(I123:AM123,"P")+(COUNTIF(I123:AM123,{"EL/P","SL/P","CO/P"})/2))
In this scenario if a person is taken all the Half Day leaves only EL/P is recongised
2.
=(COUNTIF(I123:AM123,"P")+(COUNTIF(I123:AM123,{"CO/P","SL/P","EL/P"})/2))
In this scenario if a person is taken all the Half Day leaves only CO/P is recongised
3.
=(COUNTIF(I123:AM123,"P")+(COUNTIF(I123:AM123,{"SL/P","CO/P","EL/P"})/2))
In this scenario if a person is taken all the Half Day leaves only SL/P is recongised
Can Any one Help ?
Bookmarks