I use formula to display 3 hours 7 mins as 3,7. However formula does not work correctly as it should be 3,07 also the are problems with , and . depending on Excel version.
I don't need it to be 3,07 or 3,7. I need formula to round it to either 3,5 or 4. So if it is 3,07 then it should be 3,5. Basically condition is if mins or min is less than 30 then it is ,5 if more than 30 then next ,0 Then this formula should give as a result 35 and divide it by 10. So for example 35/10 or 40/10. Then there will be no problem with , and . in different Excel versions.
NOTE! Value in P96 comes from Google Maps API xml and shows travelling hours from one location to another. Sometimes there is 3 hours 7 mins, 20 hours 37 mins and sometimes 1 hour 1 min
Current solution:
Asked also here: https://stackoverflow.com/questions/56018465
I don't need it to be 3,07 or 3,7. I need formula to round it to either 3,5 or 4. So if it is 3,07 then it should be 3,5. Basically condition is if mins or min is less than 30 then it is ,5 if more than 30 then next ,0 Then this formula should give as a result 35 and divide it by 10. So for example 35/10 or 40/10. Then there will be no problem with , and . in different Excel versions.
NOTE! Value in P96 comes from Google Maps API xml and shows travelling hours from one location to another. Sometimes there is 3 hours 7 mins, 20 hours 37 mins and sometimes 1 hour 1 min
Current solution:
Code:
=SUBSTITUTE(CEILING(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IF(ISERROR(SEARCH("hour", P96)), "0 hours ", "")&P96,"s","")," min","")," hour ","."),0.1), ".", ",")
Asked also here: https://stackoverflow.com/questions/56018465