Excel help wanted

bryanm

New Member
Joined
Jul 8, 2009
Messages
11
I am trying to setup a roster using 24 hour time format. Just need to know how to do the following. I have a start
time and a finish time showing on the same day. No problem here. When I want to show a start time on one day and a
finish time on a different day is where my lack of knowledge shows up. Here is an example of how I started.
=G10+(G9>G10)-G9 This formula is in a different cell and adds the daily hours.
G9 is the start time and G10 is the finish time. To do a shift that spans midnight I need the formula to say, G9
will be start time, if nothing in cell G10 look at cell H10 for finish time and total the hours.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I am trying to setup a roster using 24 hour time format. Just need to know how to do the following. I have a start
time and a finish time showing on the same day. No problem here. When I want to show a start time on one day and a
finish time on a different day is where my lack of knowledge shows up. Here is an example of how I started.
=G10+(G9>G10)-G9 This formula is in a different cell and adds the daily hours.
G9 is the start time and G10 is the finish time. To do a shift that spans midnight I need the formula to say, G9
will be start time, if nothing in cell G10 look at cell H10 for finish time and total the hours.
One way...

=MOD(IF(G10="",H10,G10)-G9,1)
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,147
Members
452,891
Latest member
JUSTOUTOFMYREACH

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