View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Stefi
 
Posts: n/a
Default Cells with time format and calculating the diffrence



MikeR-Oz ezt *rta:

I have formatted 2 cells say A1 and B1 as time and chose the first type
being in the form 13:30 - This shows up in the equation line as 1:12:00 PM.
So I type in 13:12 and I get what is required BUT is there a way that I can
type 1312 without having to put the ':' in? and still get it to produce the
time equation format for my 3 rd cell C1 which will be to calculate the
minutes difference between the 2 first cells eg. 13:12 and 13:20 giving the
3rd cell as 0:08 . I have used =+B1-A1 for the C1 cell.


Use an extra input column (say Z) and format it as text, and apply this
formula in your time column A and B:
=TIMEVALUE(LEFT(Z1,2)&":"&RIGHT(Z1,2))

If you enter "1312" in Z1 then A1 will show 13:12 as a real XL time value.


Also the other thing is that when I wish to calculate the minutes between
the 2 times eg 13:00 and 14:00, I get 1:00 as the answer but I need to have
the minutes i.e 60. How can I format this or do I need to write a script/
macro of some sort?



Use custom format [mm]

Regards,
Stefi