Hi Paul,
I am not sure if I understood your requirement correctly, please check the below
work shift.xlsx |
---|
|
---|
| B | C | D | E | F | G | H | I | J |
---|
2 | Sam Smith ( 263076 ) | | | | | | | | |
---|
3 | Wk No. | Sun | Mon | Tue | Wed | Thu | Fri | Sat | Hours Worked |
---|
4 | Wk 1 | RDO | 9.00 - 17.15 | 9.00 - 17.15 | 9.00 - 17.15 | 9.00 - 17.15 | 9.00 - 17.15 | RDO | 41:15 |
---|
5 | Wk 2 | RDO | 12.00 -20.00 | 12.00 -20.00 | RDO | 12.00 -20.00 | 12.00 -20.00 | 9.00 -18.00 | 41:00 |
---|
6 | Wk 3 | 10:00 - 17:00 | 8.00 - 16.30 | RDO | 8.00 - 16.30 | 8.00 - 16.30 | 8.00 - 16.30 | RDO | 41:00 |
---|
|
---|
I am sure that such a long formula can be simplified if the data format is corrected/changed, if you had Office 365, if had a better understanding of your requirement.
cheers
Best Regards
Yusuf
Hi Yusuf , Thanks for taking the time to reply , i've copied formula into my sheet ( Column K) and getting a different result unsure if I've missed some of the formula out or its just a formatting issue? ( uploaded sheet) You'll see that I've added another column (which is a weekly deduction I need to make ( unpaid Lunch) which should if my figures are right give 37.5 hrs per week . formula below and screen shot of results . cells C4-I4 . Formatting is all hh.mm .
=SUM(IFERROR(TRIM(MID(SUBSTITUTE(C4,".",":"),SEARCH("-",SUBSTITUTE(C4,".",":"))+1,LEN(SUBSTITUTE(C4,".",":"))-SEARCH("-",SUBSTITUTE(C4,".",":"))+1))*1,0)-IFERROR(TRIM(MID(SUBSTITUTE(C4,".",":"),1,SEARCH("-",SUBSTITUTE(C4,".",":"))-1))*1,0),IFERROR(TRIM(MID(SUBSTITUTE(D4,".",":"),SEARCH("-",SUBSTITUTE(D4,".",":"))+1,LEN(SUBSTITUTE(D4,".",":"))-SEARCH("-",SUBSTITUTE(D4,".",":"))+1))*1,0)-IFERROR(TRIM(MID(SUBSTITUTE(D4,".",":"),1,SEARCH("-",SUBSTITUTE(D4,".",":"))-1))*1,0),IFERROR(TRIM(MID(SUBSTITUTE(E4,".",":"),SEARCH("-",SUBSTITUTE(E4,".",":"))+1,LEN(SUBSTITUTE(E4,".",":"))-SEARCH("-",SUBSTITUTE(E4,".",":"))+1))*1,0)-IFERROR(TRIM(MID(SUBSTITUTE(E4,".",":"),1,SEARCH("-",SUBSTITUTE(E4,".",":"))-1))*1,0),IFERROR(TRIM(MID(SUBSTITUTE(F4,".",":"),SEARCH("-",SUBSTITUTE(F4,".",":"))+1,LEN(SUBSTITUTE(F4,".",":"))-SEARCH("-",SUBSTITUTE(F4,".",":"))+1))*1,0)-IFERROR(TRIM(MID(SUBSTITUTE(F4,".",":"),1,SEARCH("-",SUBSTITUTE(F4,".",":"))-1))*1,0),IFERROR(TRIM(MID(SUBSTITUTE(G4,".",":"),SEARCH("-",SUBSTITUTE(G4,".",":"))+1,LEN(SUBSTITUTE(G4,".",":"))-SEARCH("-",SUBSTITUTE(G4,".",":"))+1))*1,0)-IFERROR(TRIM(MID(SUBSTITUTE(G4,".",":"),1,SEARCH("-",SUBSTITUTE(G4,".",":"))-1))*1,0),IFERROR(TRIM(MID(SUBSTITUTE(H4,".",":"),SEARCH("-",SUBSTITUTE(H4,".",":"))+1,LEN(SUBSTITUTE(H4,".",":"))-SEARCH("-",SUBSTITUTE(H4,".",":"))+1))*1,0)-IFERROR(TRIM(MID(SUBSTITUTE(H4,".",":"),1,SEARCH("-",SUBSTITUTE(H4,".",":"))-1))*1,0),IFERROR(TRIM(MID(SUBSTITUTE(I4,".",":"),SEARCH("-",SUBSTITUTE(I4,".",":"))+1,LEN(SUBSTITUTE(I4,".",":"))-SEARCH("-",SUBSTITUTE(I4,".",":"))+1))*1,0)-IFERROR(TRIM(MID(SUBSTITUTE(I4,".",":"),1,SEARCH("-",SUBSTITUTE(I4,".",":"))-1))*1,0))