Hi all,
Thanks in advance on this, my first post so please bear with me!
The point of this worksheet is equating additional hours worked and lieu time.
I'm having an issue with working out what a formula should be for the following:-
I have a worksheet with Date (A1) Time Started (B1) Time Finished (C1) Work Completed (D1) Hours Worked (E1) Holiday Used (F1)
With the B1 & B2 formatted as h:mm AM/PM and D2 as Number to 2 Decimal places. The Work Completed column either has free text or "Holiday" or "Day Off" both of which have IF formulas on the phrase updating another table in sheet 2.
Up to now I've been using =SUM(C1-B1)*24 in the Hours Worked column to work out the total amount of hours worked in a day however have just encountered the problem of working past midnight. As it returns a negative value instead of the total amount of hours.
I've then managed to solve this using the following IF formula in Hours Worked column =IF(C1>B1,SUM(C1-B1)*24,((C1-B1)+1)*24)
Again this works fine.
The ACTUAL issue now is on Days Off - as no time is inputted into B1 or C1 - which with the above formula results in 24 Hours being recorded in Hours Worked... when it needs to obviously be zero (0).
Can anyone think of a solution? In an ideal world i'd like to still be able to leave the time columns blank or have "Day Off" written into them which I'm hoping could then be incorporated into the IF formula above to equal a 0 in the Hours Worked (E1) column.
Couple of JPG's now attached to help give a bit of context. (I know original columns are incorrect but it was just to try and keep it simple)
Cheers!
Bookmarks