ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I round time? (https://www.excelbanter.com/excel-worksheet-functions/6529-how-do-i-round-time.html)

cpme

How do I round time?
 
I am trying to build a timecard database in Excel. How do I go about
rounding the time to the nearest 1/4 hour? Is this even possible? I tried
using the MROUND function but you have to specify a specific number to round
to and since I'm dealing with timecards, the numbers are always different.
Any ideas?

tjtjjtjt

Check out this web site. Scroll down to the bottom:
http://www.cpearson.com/excel/datearith.htm

tj

"cpme" wrote:

I am trying to build a timecard database in Excel. How do I go about
rounding the time to the nearest 1/4 hour? Is this even possible? I tried
using the MROUND function but you have to specify a specific number to round
to and since I'm dealing with timecards, the numbers are always different.
Any ideas?


Bob Phillips

Take a look at http://www.xldynamic.com/source/xld.Rounding.html#time

--

HTH

RP
(remove nothere from the email address if mailing direct)


"cpme" wrote in message
...
I am trying to build a timecard database in Excel. How do I go about
rounding the time to the nearest 1/4 hour? Is this even possible? I

tried
using the MROUND function but you have to specify a specific number to

round
to and since I'm dealing with timecards, the numbers are always different.
Any ideas?




Ron Rosenfeld

On Tue, 16 Nov 2004 15:23:01 -0800, "cpme"
wrote:

I am trying to build a timecard database in Excel. How do I go about
rounding the time to the nearest 1/4 hour? Is this even possible? I tried
using the MROUND function but you have to specify a specific number to round
to and since I'm dealing with timecards, the numbers are always different.
Any ideas?


Since you are using MROUND, you can use the formula:

=mround(A1,TIME(0,15,0))

Or, if you do not want to have the ATP installed:

=ROUND(K1/(0.25/24),0)*(0.25/24)

(0.25/24 is the equivalent of 1/4 hour in Excel time and equals TIME(0,15,0))


--ron


All times are GMT +1. The time now is 01:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com