My queries all seem to link to using formula with TIME in them, they just never seem to work. The below is quite clunky, i was hoping to make it work then streamline it but struggling with the working bit first......
So the formula in question links into quite a large spreadsheet that has a variety of workstreams on it so the first few If's are basically just ignoring the row if the work function isn't what i'm looking for,
=IF(AU43="IGNORE","Not Eligible for GSOP",IF(AU43<>"ECO","Scheduled Work",IF(AND(AU43="ECO",N43="SUNDAY"),"4 Hours SLA",IF(AND(AU43="ECO",N43="Saturday",Q43>=TIME(9,0,0),Q43<=TIME(16,0,0)),"3 Hours SLA",IF(AND(LEFT(N43,3)={"MON","TUE","WED","THU","FRI"},Q42>=TIME(20,0,0),Q42<=TIME(8,0,0)),"4 Hours SLA","3 Hours SLA")))))
so:
IF(AU43="IGNORE","Not Eligible for GSOP" - works and basically tells the user based on an earlier formula, no compensation needs paid
IF(AU43<>"ECO","Scheduled Work" - works, puts all the work streams i'm not interested in, into another 'pot'
IF(AND(AU43="ECO",N43="SUNDAY"),"4 Hours SLA" - All jobs on a Sunday have 4 hours to complete, regardless of when int he day we received them - works finethen it starts to go wrong.....
IF(AND(AU43="ECO",N43="Saturday",Q43>=TIME(9,0,0),Q43<=TIME(16,0,0)),"3 Hours SLA" - this job type on a Saturday between 9am and 4pm has a 3 hours completeion time, either side of this on a Saturday. I've tried testing this on its own as IF(AND(AU43="ECO",N43="Saturday",Q43>=TIME(9,0,0),Q43<=TIME(16,0,0)),"3 Hours SLA","4hr Standard" and the logic works, it goes wrong in the nested formula though
IF(AND(LEFT(N43,3)={"MON","TUE","WED","THU","FRI"},Q42>=TIME(20,0,0),Q42<=TIME(8,0,0)),"4 Hours SLA","3 Hours SLA" I've only recently added the other days of the week in, originally i just had IF(AND(Q42>=TIME(20,0,0),Q42<=TIME(8,0,0)),"4 Hours SLA","3 Hours SLA" but everything comes out as 3 hours, so basically its defaulting to the false outcome on everything.
Where am i going wrong - am i trying to do too much, is there a different logic to apply. i've spent so long looking at this i'm struggling to take a step back to see a better way of putting it together. Any help much appreciated as i'm just formula blind at the minute :-)
Bookmarks