D
donh
Hi Group,
I'm working on a sickness monitoring sheet and I have four columns
similar to below which provide a lookup to dates on duty. I've put
together a formula (might be long winded) to calculate total days off
between two dates but now need to refer to my lookup table and
calculate how many days lost between those two dates. Its got me
stumped so far, can anyone point me in the right direction please or
pass comment on my totals formula.
If I can get this to work I intended to have a couple of IF functions
to check if its a whole month to count through or part as already in
my totals.
As always any help would be great.
Regards
Don
Total formula
=IF($B4="","",
IF(AND(ISBLANK($C4),$B4<G$3,$B4>=F$3,$B$1>G$3),G$3-$B4+N("Counts from
sick day to today if fit day is null"),
IF(AND(ISBLANK($C4),$B4<G$3,$B$1>G$3),G$3-F$3+N("Counts from sick day
to today if fit day is null"),
IF(AND($B4<=F$3,$C4>F$3,$C4<=G$3),$C4-F$3+N("sick < = start Fit >
start but < end of month"),
IF(AND($B4>=F$3,$C4>F$3,$C4<G$3),$C4-$B4+N("sick >= start and fit <
month end"),
IF(AND($B4>=F$3,$B4<G$3,$C4>G$3),G$3-$B4+N("sick >= start but before
end fit after end"),
IF(AND($B4<F$3,$C4>G$3),G$3-F$3+N("sick before start fit after end"),
0)))))))
Shift lookup table
01/01/2007 1
02/01/2007 1
03/01/2007 1
04/01/2007 1
05/01/2007
06/01/2007
07/01/2007
08/01/2007
09/01/2007 1
10/01/2007 1
11/01/2007 1
12/01/2007 1
13/01/2007
14/01/2007
15/01/2007
16/01/2007
17/01/2007 1
18/01/2007 1
19/01/2007 1
20/01/2007 1
21/01/2007
22/01/2007
I'm working on a sickness monitoring sheet and I have four columns
similar to below which provide a lookup to dates on duty. I've put
together a formula (might be long winded) to calculate total days off
between two dates but now need to refer to my lookup table and
calculate how many days lost between those two dates. Its got me
stumped so far, can anyone point me in the right direction please or
pass comment on my totals formula.
If I can get this to work I intended to have a couple of IF functions
to check if its a whole month to count through or part as already in
my totals.
As always any help would be great.
Regards
Don
Total formula
=IF($B4="","",
IF(AND(ISBLANK($C4),$B4<G$3,$B4>=F$3,$B$1>G$3),G$3-$B4+N("Counts from
sick day to today if fit day is null"),
IF(AND(ISBLANK($C4),$B4<G$3,$B$1>G$3),G$3-F$3+N("Counts from sick day
to today if fit day is null"),
IF(AND($B4<=F$3,$C4>F$3,$C4<=G$3),$C4-F$3+N("sick < = start Fit >
start but < end of month"),
IF(AND($B4>=F$3,$C4>F$3,$C4<G$3),$C4-$B4+N("sick >= start and fit <
month end"),
IF(AND($B4>=F$3,$B4<G$3,$C4>G$3),G$3-$B4+N("sick >= start but before
end fit after end"),
IF(AND($B4<F$3,$C4>G$3),G$3-F$3+N("sick before start fit after end"),
0)))))))
Shift lookup table
01/01/2007 1
02/01/2007 1
03/01/2007 1
04/01/2007 1
05/01/2007
06/01/2007
07/01/2007
08/01/2007
09/01/2007 1
10/01/2007 1
11/01/2007 1
12/01/2007 1
13/01/2007
14/01/2007
15/01/2007
16/01/2007
17/01/2007 1
18/01/2007 1
19/01/2007 1
20/01/2007 1
21/01/2007
22/01/2007