Excel formula to calculate intersected dates? -
i searched through internet , came nothing. have 2 tables. 1 includes work dates , other has vacation dates. have find intersected dates.
let me give example;
work table
1| | b | c | d 2|person | work start date | work finish date |intersected vacations 3|mike | 01.08.2013 | 10.08.2013 |1 (needed find) 4|john | 16.08.2013 | 25.10.2013 |3 (needed find)
vacations table
1|a |b |c 2|person |vacation start date |vacation end date 3|mike | 05.08.2013 | 05.08.2013 4|john | 20.09.2013 | 21.09.2013 5|john | 01.10.2013 | 01.10.2013
so, need excel formula calculate vacations between work days.
assuming counting days within periods, including saturdays , sundays can use "array formula" per screenshot below:
formula follows in d3:
=sum(if(a$8:a$10=a3,if(c$8:c$10>=b3,if(b$8:b$10<=c3,if(c$8:c$10>c3,c3,c$8:c$10)-if(b$8:b$10<b3,b3,b$8:b$10)+1))))
confirmed ctrl+shift+enter , copied down d4
this may overkill small example i'm assuming real data larger - solution can extended required, multiple unsorted vacation periods
Comments
Post a Comment