Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John
 
Posts: n/a
Default Adding time Values up in Excel

Im working on a Spreadsheet and i need the formula to work out the hours
worked.
The format of the way that the data is recived is for example 12:00-20:00 so
i need to to tell me that there has been 8 hours worked.

Could anyone help us with this

thanks
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

If you want the result as time, use

=(MID(A11,FIND("-",A11)+1,99))+0-LEFT(A11,FIND("-",A11)-1)

If decimal hours, use

=(MID(A11,FIND("-",A11)+1,99))*24-(LEFT(A11,FIND("-",A11)-1))*24

--
HTH

Bob Phillips

"John" wrote in message
...
Im working on a Spreadsheet and i need the formula to work out the hours
worked.
The format of the way that the data is recived is for example 12:00-20:00

so
i need to to tell me that there has been 8 hours worked.

Could anyone help us with this

thanks



  #3   Report Post  
John
 
Posts: n/a
Default

I have tried that but with no sucsess this is the way in witch the data is
set out .

08:30-21:00
08:30-17:30
11:00-19:00
10:00-18:00
14:00-18:00
19:00-24:00
11:00-19:00
09:30-17:30
10:30-18:30
08:30-17:00

I need it to total the hours worked i tried a sum formula but it wont add up
the total hours worked.


"Bob Phillips" wrote:

If you want the result as time, use

=(MID(A11,FIND("-",A11)+1,99))+0-LEFT(A11,FIND("-",A11)-1)

If decimal hours, use

=(MID(A11,FIND("-",A11)+1,99))*24-(LEFT(A11,FIND("-",A11)-1))*24

--
HTH

Bob Phillips

"John" wrote in message
...
Im working on a Spreadsheet and i need the formula to work out the hours
worked.
The format of the way that the data is recived is for example 12:00-20:00

so
i need to to tell me that there has been 8 hours worked.

Could anyone help us with this

thanks




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

I have just tried it with your data and it works fine.

In which way no success? If it was that the time sum came out as 7 hours,
form at that cell as [hh]:mm.

You can also sum it in one formula

=SUMPRODUCT(--((MID(A1:A10,FIND("-",A1:A10)+1,99))+0-LEFT(A1:A10,FIND("-",A1
:A10)-1)))

--
HTH

Bob Phillips

"John" wrote in message
...
I have tried that but with no sucsess this is the way in witch the data is
set out .

08:30-21:00
08:30-17:30
11:00-19:00
10:00-18:00
14:00-18:00
19:00-24:00
11:00-19:00
09:30-17:30
10:30-18:30
08:30-17:00

I need it to total the hours worked i tried a sum formula but it wont add

up
the total hours worked.


"Bob Phillips" wrote:

If you want the result as time, use

=(MID(A11,FIND("-",A11)+1,99))+0-LEFT(A11,FIND("-",A11)-1)

If decimal hours, use

=(MID(A11,FIND("-",A11)+1,99))*24-(LEFT(A11,FIND("-",A11)-1))*24

--
HTH

Bob Phillips

"John" wrote in message
...
Im working on a Spreadsheet and i need the formula to work out the

hours
worked.
The format of the way that the data is recived is for example

12:00-20:00
so
i need to to tell me that there has been 8 hours worked.

Could anyone help us with this

thanks






  #5   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi John

Bob's solution works fine for me.
You need to format your total cell as FormatCellsNumberCustom [hh]:mm
in order to get it to roll over past 24 hours.

As an alternative to the formula method, you could mark your block of data
and choose DataText to ColumnsDelimited check the Other box and insert
the symbol - and click finish.

If the original data was in column A, your start times will be in A and your
finish times will be in B. In column C enter
=B1-A1
Sum the range of C setting the format of the summation cell to [hh]:mm as
described above.

Regards

Roger Govier


John wrote:
I have tried that but with no sucsess this is the way in witch the data is
set out .

08:30-21:00
08:30-17:30
11:00-19:00
10:00-18:00
14:00-18:00
19:00-24:00
11:00-19:00
09:30-17:30
10:30-18:30
08:30-17:00

I need it to total the hours worked i tried a sum formula but it wont add up
the total hours worked.


"Bob Phillips" wrote:


If you want the result as time, use

=(MID(A11,FIND("-",A11)+1,99))+0-LEFT(A11,FIND("-",A11)-1)

If decimal hours, use

=(MID(A11,FIND("-",A11)+1,99))*24-(LEFT(A11,FIND("-",A11)-1))*24

--
HTH

Bob Phillips

"John" wrote in message
...

Im working on a Spreadsheet and i need the formula to work out the hours
worked.
The format of the way that the data is recived is for example 12:00-20:00


so

i need to to tell me that there has been 8 hours worked.

Could anyone help us with this

thanks




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
conditional formatting with time values Access Idiot Excel Discussion (Misc queries) 2 September 13th 05 03:29 PM
Is there way to enter multiple values into excel cells w/ a form? grassfed Excel Discussion (Misc queries) 1 June 22nd 05 05:26 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Unix Time in Excel Craig Walker Excel Worksheet Functions 2 March 21st 05 06:29 PM
Calculating tvl time in Excel 2000 Rev.9.2720 Brandi Excel Worksheet Functions 5 January 27th 05 09:15 PM


All times are GMT +1. The time now is 07:18 PM.

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"