exel shema hjälp.xlsx
please open attach to read and see my problem..
exel shema hjälp.xlsx
please open attach to read and see my problem..
Perhaps in E7 =D7-C7-QUOTIENT(D7-C7,5)*0.5 (providing time is entered in decimal as you did)
You almost had it, but you could try
=(D7-C7)-((D7-C7)>=5)*0.5-((D7-C7)>=10)*0.5
Thank you but the problem is still there. I cant enter real time in the "work time" cell, (ex 7:15, 7:30, 7:45) now i have to enter (ex 7,25. 7,5. 7,75)
Tryed to use =MOD(C7-D7;1)*24 to get the time right but then the other calculation doesnt work.
I found this youtube link to help me but i donīt want the weekdays in it but perhaps some coding are helpfull.
http://www.youtube.com/watch?v=CtrFnGWqoGE
Thank you but the problem is still there. I cant enter real time in the "work time" cell, (ex 7:15, 7:30, 7:45) now i have to enter (ex 7,25. 7,5. 7,75)
Tryed to use =MOD(C7-D7;1)*24 to get the time right but then the other calculation doesnt work.
I found this youtube link to help me but i donīt want the weekdays in it but perhaps some coding are helpfull.
http://www.youtube.com/watch?v=CtrFnGWqoGE
Thank you but the problem is still there. I cant enter real time in the "work time" cell, (ex 7:15, 7:30, 7:45) now i have to enter (ex 7,25. 7,5. 7,75)
Tryed to use =MOD(C7-D7;1)*24 to get the time right but then the other calculation doesnt work.
I found this youtube link to help me but i donīt want the weekdays in it but perhaps some coding are helpfull.
http://www.youtube.com/watch?v=CtrFnGWqoGE
change the display of the numbers to time instead of number
then input in time format, e.g. 7:30 16:15 or 4:15 pm
then using the time format as input you can use
=(D7-C7)-(D7-C7>=5/24)*1/48-(D7-C7>=10/24)*1/48
the result is right in time format
multiply this by 24 and display as number instead of time if you want the result in decimal hours
if you want mixed input of time format and decimal format, you are creating yourself an interesting problem, but you can probably safely assume that anything > 1 was in decimal format and build your checks from that. You cannot be sure of course, so maybe you should first decide what format you actually want.
Regards
Adapted formula![]()
Please Login or Register to view this content.
Thank you 4 all help,
This should get your hours in decimal: =((D7-C7)*(1440/60)) after changing the number format to time for the input. So =IF(((D7-C7)*(1440/60))>10,(((D7-C7)*(1440/60))-1),IF(((D7-C7)*(1440/60))>5,(((D7-C7)*(1440/60))-0.5),(D7-C7)*(1440/60))) This worked for me using your sheet. I am not sure I remember why I had to use the 1440/60 to get hours, but that was the only way I could make this work for me in my application.
Jacob Albers
Excel 2003 & 2010
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks