Forum Discussion
Time formula
Alternatively:
Suppose your start and end times are in A1 and B1, then in C1:
=IF(A1>B1,1-A1+B1,B1-A1)
Also important to enter times so that Excel knows if it is e.g. 11:30 AM or 11:30 PM (i.e. 23:30). In your example, the formula probably did 7:30 (AM) minus 11:30 (AM). That's a negative and your result will ######### if formatted as a time.
Yes, it works, thank you, just the total does not work, any idea? OK, I got the total to work. Thank you very much. I'll buy you a beer if you ever come to my bar in Thailand. Cheers.
- Riny_van_EekelenDec 01, 2019Platinum Contributor
Glad you solved the total yourself. I'll let you know when I'm near 🙂
- HarreidDec 01, 2019Copper Contributor
Riny_van_Eekelen Hi again, well I thought I found the formula and got the right answer, but then it disappeared. Now I can't get it to work again. Do you come to Thailand?
- Riny_van_EekelenDec 01, 2019Platinum Contributor
See attached. It's important to format the total cell correctly. My initial thought was to have it as a decimal number. Then you would sum the hours and multiply by 24 and format it as a number. Alternatively, you can just format the summed hours as a Time but in a special way. It's indicated in the attached workbook.
No, not planning to come to Thailand anywhere soon. It was 22 years since I was there.