#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
demetri
 
Posts: n/a
Default Adding hrs

How do you make a formula that sais that an employee started work at 4am and
finished at 1030 am i need the answer to 6.5 hrs. The problem would read say
in cell a1 "0400" in cell a2 (1030) and then I want cell 3 to display the
amount of hrs as 6.5 not 6.3?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sloth
 
Posts: n/a
Default Adding hrs

You should enter it as time and change the formats.

Input
A1: 4:00 AM
A2: 10:30 AM
A3: 24*(A2-A1)

Format A1 and A2 as
hhmm
and format A3 as General or as a number

Result:
A1: 0400
A2: 1030
A3: 6.5

"demetri" wrote:

How do you make a formula that sais that an employee started work at 4am and
finished at 1030 am i need the answer to 6.5 hrs. The problem would read say
in cell a1 "0400" in cell a2 (1030) and then I want cell 3 to display the
amount of hrs as 6.5 not 6.3?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
demetri
 
Posts: n/a
Default Adding hrs



"Sloth" wrote:

You should enter it as time and change the formats.

Input
A1: 4:00 AM
A2: 10:30 AM
A3: 24*(A2-A1)

Format A1 and A2 as
hhmm
and format A3 as General or as a number

Result:
A1: 0400
A2: 1030
A3: 6.5

"demetri" wrote:

How do you make a formula that sais that an employee started work at 4am and
finished at 1030 am i need the answer to 6.5 hrs. The problem would read say
in cell a1 "0400" in cell a2 (1030) and then I want cell 3 to display the
amount of hrs as 6.5 not 6.3?


Thank you!
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Adding hrs

Try

=INT(A2/100)+MOD(A2,100)/60-INT(A1/100)+MOD(A1,100)/60

and format as general

--

HTH

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


"demetri" wrote in message
...
How do you make a formula that sais that an employee started work at 4am

and
finished at 1030 am i need the answer to 6.5 hrs. The problem would read

say
in cell a1 "0400" in cell a2 (1030) and then I want cell 3 to display

the
amount of hrs as 6.5 not 6.3?



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
adding vertical bars to an embedded chart using VBA Wazooli Excel Discussion (Misc queries) 0 November 15th 05 06:47 PM
Adding values from previous worksheets firecord Excel Worksheet Functions 1 June 27th 05 09:59 AM
help neede with adding times rvnwdr Excel Discussion (Misc queries) 1 June 17th 05 02:15 PM
problem adding rvnwdr Excel Discussion (Misc queries) 2 June 8th 05 06:36 PM
adding cells that contain formulas that have returned error messag Daniel R Excel Worksheet Functions 3 February 21st 05 08:14 PM


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

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

About Us

"It's about Microsoft Excel"