Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lbfries
 
Posts: n/a
Default rounding time question

I am working on a timehsheet in which a user has requested the times be
rounded in the following fashion:

1-14 minutes= round down to zero
15-22 minutes= round down to 15
23-27 minutes=round up to 30 minutes
38-52 minutes=round down to 45
53-60 minutes=round to next hour

Is this possible in Excel?

Also, can you change the Excel time format to display time as "regular time"
and not military time for time entry? A user does not want to have to enter
1:00 pm as 13:00 when entering his/her time. I can't find a function to do
that.
  #2   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"lbfries" wrote in message
...
I am working on a timehsheet in which a user has requested the times be
rounded in the following fashion:

1-14 minutes= round down to zero
15-22 minutes= round down to 15
23-27 minutes=round up to 30 minutes
38-52 minutes=round down to 45
53-60 minutes=round to next hour

Is this possible in Excel?

Also, can you change the Excel time format to display time as "regular

time"
and not military time for time entry? A user does not want to have to

enter
1:00 pm as 13:00 when entering his/her time. I can't find a function to

do
that.


I assume your sheet is made in such a way that people are entering the time
manually? I waould like to know a few more details, like the exact string
that you enter. I guess you could put the code in a worksheet cahnge event.

/Fredrik


  #3   Report Post  
lbfries
 
Posts: n/a
Default

The time is entered in the worksheet as follows:

IN: 8:00 OUT: 12:00 IN: 13:00 OUT:17:00

The formula to sum the amount of hours worked is as follows:
=SUM(M9-L9)+(K9-J9)+(I9-H9)+(G9-F9)+(E9-D9) With M9 being an OUT time, and
L9 being an IN time.


"Fredrik Wahlgren" wrote:


"lbfries" wrote in message
...
I am working on a timehsheet in which a user has requested the times be
rounded in the following fashion:

1-14 minutes= round down to zero
15-22 minutes= round down to 15
23-27 minutes=round up to 30 minutes
38-52 minutes=round down to 45
53-60 minutes=round to next hour

Is this possible in Excel?

Also, can you change the Excel time format to display time as "regular

time"
and not military time for time entry? A user does not want to have to

enter
1:00 pm as 13:00 when entering his/her time. I can't find a function to

do
that.


I assume your sheet is made in such a way that people are entering the time
manually? I waould like to know a few more details, like the exact string
that you enter. I guess you could put the code in a worksheet cahnge event.

/Fredrik



  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 6 Apr 2005 09:11:13 -0700, "lbfries"
wrote:

I am working on a timehsheet in which a user has requested the times be
rounded in the following fashion:

1-14 minutes= round down to zero
15-22 minutes= round down to 15
23-27 minutes=round up to 30 minutes
38-52 minutes=round down to 45
53-60 minutes=round to next hour

Is this possible in Excel?


Set up a two column table as follows:

0 00:00
15 15:00
23 30:00
38 45:00
53 00:00

To obtain the values in the second column, you may enter them as
0
0:15
0:30
0:45
1:00

Then use this formula:

=FLOOR(A1,1/24)+VLOOKUP(MINUTE(A1),tbl,2)

where "tbl" is the reference to the above table.


Also, can you change the Excel time format to display time as "regular time"
and not military time for time entry? A user does not want to have to enter
1:00 pm as 13:00 when entering his/her time. I can't find a function to do
that.


To DISPLAY time, look at Format/Cells/Number/Time or set up a custom format.

To ENTER times, the user may also use "1 P" without the quotation marks for
1PM. This may depend on your regional settings, though


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Work Hours Time Question Qaspec Excel Worksheet Functions 5 March 27th 05 02:58 PM
time formula question... Greg Excel Discussion (Misc queries) 5 February 25th 05 10:11 AM
rounding question Amie Excel Discussion (Misc queries) 2 January 21st 05 04:44 PM
Rounding time in excel (2003) Alan Excel Discussion (Misc queries) 3 January 11th 05 04:44 PM
Best time question Daniel Bonallack Excel Worksheet Functions 2 December 10th 04 11:37 PM


All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"