Forum Discussion
sharear
May 24, 2022Copper Contributor
Formula does not work in my computer
Date..............Day...............Time In............Time Out...........Time In............Time Out...........Total Hours
5/24/2022.....Tuesday.......08:05AM........12:00PM...........07:00PM .......12:01 AM ...........#VALUE!
I used this =(E9-D9)+(H9-G9) Formula. But my computer didn't work. I Go to Region-Additional Date & Time- number-list operator. But didn't work formula.
Are you sure you have time formatted in am/pm time format, not texts? In first case here
it shall be space before PM. You may check applying General format to that cell. If time, you'll see the number ~0.6674
Are you sure you have time formatted in am/pm time format, not texts? In first case here
it shall be space before PM. You may check applying General format to that cell. If time, you'll see the number ~0.6674
The time in D9 is PM and that in E9 is AM, so the checkout time is after midnight. This makes the difference E9-D9 negative. Excel cannot handle that.
Use the following:
=MOD(E9-D9,1)+MOD(H9-G9,1)
Format I9 as h:mm. For Total Hours in I9, you will want to use the custom format [h]:mm to allow for a total over 24 hours,
- sharearCopper Contributor
Dear HansVogelaar, I place your formula. but doesn't work this formula.
Could you attach a sample workbook (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar? Thanks in advance.