Time difference

mac_see

Active Member
Joined
Oct 15, 2002
Messages
419
If I put the time 00:30 in Cell B1 and the time 23:00 in Cell A1 and check out the difference (B1-A1), it gives me an error. Ideally it should be 1:30.

Is there something wrong in the formats?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
No it gives me 22:30. I am talking about midnight times.

A1 = 2300 1 hour before midnight
A2 = 00:30 half hour after midnight (next day)

XL somehow does not understand that the next time is a next day time.
 
Upvote 0
Not necessarily. Excel will not calculate JUST time. It must have a date with it also. You will not always see the date in lieu of cell formatting, which acts like a mask. Different formats = Different masks.

Change the format of the cells to include dates. They will most likely be 1/1/1900 00:30 AM or something like that. So they are the same day. If you are taking the smaller one from the larger one you are getting an infinite number of # signs ( ###### ) in lieu of a negative time value, which Excel cannot calculate. Or you are getting a result of 22:30.
 
Upvote 0

Forum statistics

Threads
1,203,203
Messages
6,054,130
Members
444,703
Latest member
pinkyar23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top