Leigh Digons
Member
I would like to count the days in the office in a given month, where there is a start date, Leave of Absence date (up to 3-4 leaves of absences), and a termination date.
I have attached the file. In Column P I have the formula:
=IF(OR($C8>Q$6,$C8=""),(((MAX(0,MIN(EOMONTH(Q$6,0),$I8)-MAX(Q$6,$H8)))+(IF(AND($B8<DATE(2015,2,1),$B8>DATE(2014,12,31)),($B8-Q$6),0)+(IF(OR($C8="",$C8>DATE(2015,1,31),$C8<DATE(2015,1,1)),0,(R$6-$C8)))))),0)
This is unfortunately giving me 30 days for each month where there are no LOAs listed (blank cells). I would like those to come out as 0.
I have attached the file. In Column P I have the formula:
=IF(OR($C8>Q$6,$C8=""),(((MAX(0,MIN(EOMONTH(Q$6,0),$I8)-MAX(Q$6,$H8)))+(IF(AND($B8<DATE(2015,2,1),$B8>DATE(2014,12,31)),($B8-Q$6),0)+(IF(OR($C8="",$C8>DATE(2015,1,31),$C8<DATE(2015,1,1)),0,(R$6-$C8)))))),0)
This is unfortunately giving me 30 days for each month where there are no LOAs listed (blank cells). I would like those to come out as 0.