Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
sorry duplicate post.
Last edited by neilcarden : November 1st 06 at 12:33 PM |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Wed, 1 Nov 2006 12:14:59 +0000, neilcarden
wrote: Hi If I have a cell that contains '09:00-17:30' - is there a formula or way I can get the amount of hours worked into another cell without using text to columns to seperate the values and work it out that way? Thanks in advance Neil If the format is exactly as you describe, then: =LEFT(RIGHT(A1,6),5)-RIGHT(LEFT(A1,6),5) Format the result as h:mm OR, if you want just the number of hours, so as to be useful in a salary calculation, use: =24*(LEFT(RIGHT(A1,6),5)-RIGHT(LEFT(A1,6),5)) and format as General or as Number with the required number of decimal places. --ron |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Wed, 01 Nov 2006 08:02:22 -0500, Ron Rosenfeld
wrote: On Wed, 1 Nov 2006 12:14:59 +0000, neilcarden wrote: Hi If I have a cell that contains '09:00-17:30' - is there a formula or way I can get the amount of hours worked into another cell without using text to columns to seperate the values and work it out that way? Thanks in advance Neil If the format is exactly as you describe, then: =LEFT(RIGHT(A1,6),5)-RIGHT(LEFT(A1,6),5) Format the result as h:mm OR, if you want just the number of hours, so as to be useful in a salary calculation, use: =24*(LEFT(RIGHT(A1,6),5)-RIGHT(LEFT(A1,6),5)) and format as General or as Number with the required number of decimal places. --ron The basic formula could be written also as: =MID(A1,8,5)-MID(A1,2,5) or =24*(MID(A1,8,5)-MID(A1,2,5)) --ron |
#4
![]() |
|||
|
|||
![]()
Thanks guys!!! all are great...
Save's me a days work now!!! Cheers |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=MID(A1,8,5)-MID(A1,2,5)
Format as [h]:mm -- David Biddulph "neilcarden" wrote in message ... Hi If I have a cell that contains '09:00-17:30' - is there a formula or way I can get the amount of hours worked into another cell without using text to columns to seperate the values and work it out that way? Thanks in advance Neil |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
use vlook to show the value of a cell using a formula | Excel Discussion (Misc queries) | |||
I Need a formula to evaluate a cell with + or - values | Excel Worksheet Functions | |||
Possible Lookup Table | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |