Thread: Time
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Time

Tell her/him he's an idiot!

=SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("-",A1)+1,2),"A",":00 AM"),"P",":00
PM")-SUBSTITUTE(SUBSTITUTE(LEFT(A1,FIND("-",A1)-1),"A",":00 AM"),"P",":00
PM")

if you want it as an integer use

=24*(SUBSTITUTE(SUBSTITUTE(MID(A1,FIND("-",A1)+1,2),"A",":00 AM"),"P",":00
PM")-SUBSTITUTE(SUBSTITUTE(LEFT(A1,FIND("-",A1)-1),"A",":00 AM"),"P",":00
PM"))


--
Regards,

Peo Sjoblom



"Panski" wrote in message
...
Peo,

Thank you for answering so soon. My supervivor does not want to change
current layout of schedule. I like your way but not able to use it. is
there
another way?

Paul

"Peo Sjoblom" wrote:

Use real times instead of text and put them in separate cells

07:00 AM in A1
03:00 PM in B1


=B1-A1





--
Regards,

Peo Sjoblom



"Panski" wrote in message
...
If a cell contains 7A-3P (Day shift). Is there a way to calulate the
total
hours in another cell?

Thank you,

Paul

I am a new guy