Combind a Mod formula with Mround

Robert Wyatt

Board Regular
Joined
Jul 15, 2012
Messages
102
Office Version
  1. 2019
Platform
  1. Windows
I have a formula to calculate my time but how would I combined it with Mround to have it round the time to nearest 1/4? I have an XL2BB to show y'all want I'm doing. Need to have the worked hours and the MROUND Total to be combined is there a way to do that?

Book1.xlsm
BCDEFGHI
2Hours Scheduled To WorkWeekdayShift StartsLunch StartsLunch EndsShift EndsWorked HoursMROUND TOTAL
39:55 AM4:55 PM7.007.00
42:55 PM5:09 PM6:08 PM10:21 PM6.456.50
56:00 PM10:20 PM4.334.25
68:00 AM1:02 PM5.035.00
70.000.00
80.000.00
90.000.00
10Total Hrs:22.8222.75
Sheet1
Cell Formulas
RangeFormula
H3:H9H3=(MOD(G3-D3,1)-MOD(F3-E3,1))*24
I3:I9I3=MROUND(H3,1/4)
H10:I10H10=SUM(H3:H9)
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
By your table, to combine a formula for calculating time, =MROUND(A1, "0:15") ; and you want to incorporate it directly =MROUND((End_Time - Start_Time) * 24, 0.25) ; converts it to hours by multiplying by 24, and then rounds to the nearest 0.25 hours (15 minutes). custom formulas =ROUND(A1 / (1/96), 0) * (1/96)
 
Upvote 0
By your table, to combine a formula for calculating time, =MROUND(A1, "0:15") ; and you want to incorporate it directly =MROUND((End_Time - Start_Time) * 24, 0.25) ; converts it to hours by multiplying by 24, and then rounds to the nearest 0.25 hours (15 minutes). custom formulas =ROUND(A1 / (1/96), 0) * (1/96)
I would like to have in all in together so take out the MROUND Total and have in just under the worked hours Colum only.
 
Upvote 0
How about
Excel Formula:
=MROUND((MOD(G3-D3,1)-MOD(F3-E3,1))*24,1/4)
 
Upvote 0
Solution
How about
Excel Formula:
=MROUND((MOD(G3-D3,1)-MOD(F3-E3,1))*24,1/4)
Thank you so much it works great. I just never thought about putting the MROUND in first. I did try putting 1/4 at the end. thanks for the help.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,735
Messages
6,180,636
Members
452,992
Latest member
TokugawaIesuma

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