Rounding Time - 15-Minute Increments

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,476
Office Version
  1. 365
Platform
  1. Windows
I have a massive spreadsheet of actual time punches and I need them to be rounded to increment of 15 minutes. The rule is that if a punch has to be within 7 minutes or less of the 15-minute increment so 6:37 pm becomes 6:30 pm while 6:38 pm becomes 6:45 pm; 6:01 pm becomes 6:00 pm while 6:08 pm becomes 6:15 pm.

How do I do that?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,612
Office Version
  1. 365
Platform
  1. Windows
Depends if you want to keep the original times for reference or overwrite them.

Keeping the original times, you can use a formula =MROUND(A2,1/96) where A2 contains a punch time.

Overwriting the original times will require the use of vba.
 

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,476
Office Version
  1. 365
Platform
  1. Windows
Yes, that works!

Can you explain what the "1/96" does so I can understand the formula?
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,612
Office Version
  1. 365
Platform
  1. Windows
If you divide 1 day by 96, you get 15 minutes.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,499
Messages
5,636,684
Members
416,935
Latest member
Atulcp

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
Top