Forum Discussion
How to subtract the difference between 2 cells that contain DD:MM:YYYY HH:MM?
- May 09, 2023
Thanks!
The number format is hh:mm, not [hh]:mm as I suggested.
If you change the number format to the custom format [hh]:mm, you'll see the correct duration:
Workbook attached.
Set the number format of the cell with the difference to the custom format [hh]:mm
The [ ] around hh instruct Excel to display the time as duration instead of as clock time.
- HansVogelaarMay 09, 2023MVP
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
- alexw94May 09, 2023Copper Contributor
I attach a screenshot of small sample of the table, the red line highlighted is where there is an issue. As this line is subtracting between 2 days as well as the time difference, it is not returning the correct answer it should be 48 hours (with it being 2 days and 14 minutes). I need a formula that will return the true HH:MM's between these 2 dates and times, the formula I have used B2-A2 doesn;t seem to recognise that there is a date within the field and is not subtracting the difference. I need to have the HH:MM between 2 dates and times. Screenshot attacted 🙂
- HansVogelaarMay 09, 2023MVP
I'm afraid that doesn't help. I repeat the request from my previous reply.