Cell format

TIM WEIPERS

New Member
Joined
Sep 23, 2004
Messages
37
Hi,

I need the cells in a workbook formatted for date time in order to be able to calculate time differences over midnight. However, I don't want the cell to actually show the date only the time. Is this possible ?

Many thanks
Tim
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hello TIM WEIPERS,
Unless there's more to your question than I'm seeing, all you need to do is format
your range(s) to display the way you want.
If you enter '8/13/07 9:15:25 PM' into a cell and then format it as Time > 1:30 PM,
the cell's value will be the date/time but the display will be '9:15 PM'

Is that what you're looking for?
 
Upvote 0
Hi Andrew / Halface,

I thought that might be the case. What I really want is for other users to be able to enter a time in cell B13 and another time in cell C14 (ie without them having to enter a date at all) and the difference to be shown in cell D13 even if the time in cell C14 has gone over midnight.

I don't think it'll be possible but who knows.
Thanks
Tim
 
Upvote 0
If A1 contains the start time and A2 the end time:

Code:
=A2-A1+(A2<A1)

will cater for going over midnight.
 
Upvote 0
Code:
If A1 contains the start time and A2 the end time:

=A2-A1+(A2<A1)

will cater for going over midnight.
 
Upvote 0
Chaps,

Many thanks. With a bit of tinkering, it works (not tinkering with your formula; tinkering with the rest of mine !).

Cheers
Tim
 
Upvote 0

Forum statistics

Threads
1,214,824
Messages
6,121,784
Members
449,049
Latest member
greyangel23

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