#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Time Sheets

I am currently working on time sheets for my employees and this is what I need to do; Allow users to enter their start time and finishing time, deduct breaks and give a final total. Is there a way to do this so that for example if you started at 12pm and ended at 2:45pm with no breaks it will be displayed as 2.75 hours rather than 2:45?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Time Sheets

Nick,

Multiply your time value by 24 to convert 2:45 to 2.75. See
www.cpearson.com/excel/datetime.htm for lots more information about working
with dates and times in Excel.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Nick Ison" wrote in message
...
I am currently working on time sheets for my employees and this is what I

need to do; Allow users to enter their start time and finishing time, deduct
breaks and give a final total. Is there a way to do this so that for example
if you started at 12pm and ended at 2:45pm with no breaks it will be
displayed as 2.75 hours rather than 2:45?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Time Sheets

a1= 2:45

=HOUR(A1)&"."&(MINUTE(A1)*100/60

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Time Sheets

Hi mudraker!

Usually the need for conversion is that the time is going to be used
in a subsequent calculation of wages etc.

You solution returns text. Although using =B1*2 will coerce your
formula to text, you'll still get problems with functions such as SUM
which will treat the return as zero.

So where there is a potential need for use in calculations:

=--(HOUR(A1)&"."&(MINUTE(A1)*100/60))

You'll still get problems if the formula is used on times in excess of
24:00 (formatted aggregates [hh]:mm). In that case your formula will
only return the modulus of the hours divided by 24. You could get
round this by incorporating a DAY in your calculations but...

Far easier and safer to multiply by 24.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"mudraker " wrote in message
...
a1= 2:45

=HOUR(A1)&"."&(MINUTE(A1)*100/60)


---
Message posted from
http://www.ExcelForum.com/



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
Time Sheets Malone Excel Discussion (Misc queries) 2 February 22nd 07 02:32 PM
Time log adding time from separate sheets teastman New Users to Excel 1 December 31st 05 04:14 PM
time sheets emmcee Excel Discussion (Misc queries) 4 August 24th 05 06:04 AM
Time Sheets Helen Black Excel Worksheet Functions 0 March 21st 05 09:32 AM
Time Sheets Helen Black Excel Worksheet Functions 1 March 19th 05 01:41 PM


All times are GMT +1. The time now is 01:40 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"