+ Reply to Thread
Results 1 to 2 of 2

Converting number format to time format

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    Marin, California
    MS-Off Ver
    Excel 2007
    Posts
    2

    Exclamation Converting number format to time format

    I need to find out how many hours about 25 classrooms are being used. Each classroom has multiple classes each week. The start and end times are in military time but without the colon ie. 0900 to 1300; not 09:00 to 13:00. When I try to format the cells to time, all the data disappears. Any ideas??

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Converting number format to time format

    Without converting the start/end times, if you want to find out the difference, try:

    =(REPLACE(B2,3,0,":")-REPLACE(A2,3,0,":"))*24 formatted as General to give total hours.

    where A2 and B2 contain the start/end times as entered.

    If you want to convert the times, do them in separate cells with formula:

    =REPLACE(A2,3,0,":")+0 and =REPLACE(B2,3,0,":")+0

    and then subtract the 2 and multiply by 24 and format as General.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1