Hi everyone
I'm having a nightmare with nested ifs. Basically I have a spreadsheet capturing rota timing. To make easier for users they enter in clock format timing i.e. if someone starts at 9:15am they select 09:15 rather than a decimalised number of 9.25. When it comes to working out the total time worked and I start to subtract start, finish and break times I get decimalised answers e.g.
start = 09:15, end = 11:30, break = 0:45 so they worked an hour and a half but if I subtract start and break time from finish time I get 1.7 hrs worked.
So I've created a nested if statement to cover all funnies that might fall out like .7 should be .5 in this example. Only thing is when I add in a pre-check IF (to see if they are on holiday) if says I've too many nests..
I have looked a various other responses to this query from other users but I cannot seem to get them to work for me. Any thoughts greatly appreciated.
Here is code so formula..
=IF(C80 = "Hol", "0", if(RIGHT(ROUND(D84-C84-E84,2),2)="55",(D84-C84-E84)-0.3,IF(RIGHT(ROUND(D84-C84-E84,2),2)="85",(D84-C84-E84)-0.1,IF(RIGHT(ROUND(D84-C84-E84,2),2)="15",(D84-C84-E84)+0.1,IF(RIGHT(ROUND(D84-C84-E84,2),2)=".3",(D84-C84-E84)+0.2,IF(RIGHT(ROUND(D84-C84-E84,2),2)=".7",(D84-C84-E84)-0.2,IF(RIGHT(ROUND(D84-C84-E84,2),2)="45",(D84-C84-E84)+0.3,IF(RIGHT(D84-C84-E84,2)=".4", (D84-C84-E84)-0.4,(D84-C84-E84)))))))))
Bookmarks