Calculate Time Formula

esgca2010

New Member
Joined
Jul 29, 2010
Messages
40
I would like to calculate the difference between start time and end time AND have the result appear in "quarters".

Examples:
B9 C9 E9
Start Time End Time Result
7:00am 10:30am 3.50
7:00am 10:15am 3.25
7:00am 10:45am 3.75

I thank you in advance for your support.

It is truly appreciated.

Respectfully,

Elaine
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
E9: =MROUND((C9-B9+(C9<=B9))*24, 0.25)

formatted as General or Number with 2 decimal places.

The (C9<=B9) factor allows for time periods within 24 hours spanning across midnight. For example, 7:00 PM and 10:30 AM.
 
Last edited:
Upvote 0
E9: =MROUND((C9-B9+(C9<=B9))*24, 0.25)

formatted as General or Number with 2 decimal places.

The (C9<=B9) factor allows for time periods within 24 hours spanning across midnight. For example, 7:00 PM and 10:30 AM.

------------------------------
Awesome thank you but can you help me with an if statement that I applied to your formula?

I there are no times in cells C9, and B9 I get a result of 24. How do I modify the formula to show the cell blank if there are no times?

=IF($D$9="Recovery Services",MROUND(($C$9-$B$9+($C$9<=$B$9))*24,0.25),"")

Thank you, thank you, thank you! You are the BEST!!!

Elaine
 
Upvote 0
=IF(AND(D9="Recovery Services", COUNT(B9,C9)=2), MROUND((C9-B9+(C9<=B9))*24, 0.25), "")

Note my use of relative references without dollar signs ("$"). Those reference change as you copy the formula down the column. I presume you would want that. Or it is just easier to type, if you do not intend to copy the formula.

You only need to use absolute references with dollar signs for cell references that should not change when you copy the formula.
 
Upvote 0
=IF(AND(D9="Recovery Services", COUNT(B9,C9)=2), MROUND((C9-B9+(C9<=B9))*24, 0.25), "")

Note my use of relative references without dollar signs ("$"). Those reference change as you copy the formula down the column. I presume you would want that. Or it is just easier to type, if you do not intend to copy the formula.

You only need to use absolute references with dollar signs for cell references that should not change when you copy the formula.
---------

You are AWESOME!!! I was using the OR statement! :-(

Thank you for your support! You are a life saver. I can have a good weekend.

Elaine
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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