On Dec 6, 11:07*am, "Search & You Will Find" <jones.joh...@gmail.com>
wrote:
> On Nov 12, 6:59*am, James Ravenswood <james.ravensw...@gmail.com>
> wrote:
>
>
>
>
>
> > On Nov 9, 7:50*pm, "Search & You Will Find" <jones.joh...@gmail.com>
> > wrote:
>
> > > What I am looking to do is calculate time between two individuals and
> > > determine how much of the day (percentage) they will see each other.
> > > Example: Employee A is at work from 8-5 and employee B is at work from
> > > 12-9 then they would have 5 hours of facetime which would be 62.5%
> > > facetime.
>
> > > My Workbook is set up like this:
>
> > > Worksheet A
> > > Employee * * *| * Monday Start * *| * * Monday End * *| * * Tuesday
> > > Start * * |
> > > Employee 1 * | * 10:00 AM * * * * *| * * 8:00 PM * * * * *| * * *10:00
> > > AM * * * * *|
>
> > > Worksheet B
> > > Employee * * *| * Monday Start * *| * * Monday End * *| * * Tuesday
> > > Start * * |
> > > Employee A * | * 8:00 AM * * * * * | * * 5:00 PM * * * * *| * * *8:00
> > > AM * * * * * *|
> > > Employee B * | * 8:00 AM * * * * * | * * 5:00 PM * * * * *| * * *8:00
> > > AM * * * * * *|
> > > Employee C * | * 8:00 AM * * * * * | * * 5:00 PM * * * * *| * * *8:00
> > > AM * * * * * *|
> > > Employee D * | * 8:00 AM * * * * * | * * 5:00 PM * * * * *| * * *8:00
> > > AM * * * * * *|
> > > etc
>
> > > At the end of the row for employee A is where I'd like to put the
> > > calculation. I was thinking something down the lines of a SUMPRODUCT,
> > > but I don't think it will work right with the situation I have.
>
> > > So for Monday, facetime is xx hours; Tuesday, facetime is xx hours;
> > > etc. and the forumla would add them up, determine how many hours out
> > > of 40 they align, and give the total facetime of xx.xx%.
>
> > For a pair of individuals, the overlap time is the minimum of the end
> > times less the maximum of the start times. *So if A1 thru B2 contain:
>
> > 8:00 AM 5:00 PM
> > 12:00 PM * * * *9:00 PM
>
> > then =MIN(B1,B2)-MAX(A1,A2) *will display the 5 hours
> > and *=(MIN(B1,B2)-MAX(A1,A2))/(B1-A1) formatted as % will display
> > 55.56%
>
> > You might be able to adapt this method to your data layout.- Hide quoted text -
>
> > - Show quoted text -
>
> Thank you for this response. It worked PERFECTLY until there were days
> that individual a worked, but individual b didn't work. :-/
> I am trying to avoid a compound IF phrase that looks at each persons
> days off as that would become way to combersome of a formula. Any
> other ideas?
The IF logic can be consolidated into a single test if 00:00 is not a
valid start/end time:
=IF(A1*B1*A2*B2=0,0,posted formula)
|