I'm trying to write an excel sheet that when opened, shows how many parts our company should have made at that particular moment (target). We do a 3 shift pattern with 3 sessions each day, 3 lines within our shift all running at different speeds and efficiency. I've got the sheet working as I want it except for one of the shifts, as our night shift starts before midnight and finishes at 7am I cant seem to get the formula working to work out how many minutes have been worked in the first session as this is the session that goes past midnight. I have attached the file so it becomes easier to understand. All my formulas and working out is done on the 'Formulas' tab, the cells coloured green may have to be altered on occasion so if the shift pattern times change, the sheet will automatically adjust to give the correct target. The targets tab is where the info is simplified and shown.