+ Reply to Thread
Results 1 to 6 of 6

Converting Time to a decimal and ...

  1. #1
    Registered User
    Join Date
    03-11-2009
    Location
    Vancouver, Washington
    MS-Off Ver
    Excel 2003
    Posts
    9

    Question Converting Time to a decimal and ...

    Ok i'm wondering if this is possible. I'm trying to make a formula that will convert time into a decimal. This is used for keeping track of hours. Example: Billy bob joe signed in from 2:12 to 3:00. so for me to track the hours i have to round to the nearest 1/4 which makes 2:15 to 4:00. which would give them 1.75 hours for that day. is there anyway for excel to do this for me. Hope this makes sense, and as always thank you for your time guys.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting Time to a decimal and ...

    =round((b1-a1)*96, 0) / 4
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Converting Time to a decimal and ...

    Try
    =round((b1-a1)*24/0.25,0)*0.25
    essentially the same since 24/0.25 =96 anyway but perhaps gives a clearer picture of what was done.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    03-11-2009
    Location
    Vancouver, Washington
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Converting Time to a decimal and ...

    OMG this works perfect, but is it possible to explain the formula. *24/0.25,0 is throwing me off.

  5. #5
    Registered User
    Join Date
    03-11-2009
    Location
    Vancouver, Washington
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Converting Time to a decimal and ...

    Hmm, well i thought it worked perfect, until in put in an entry where someone came in at 10:00 to 3:00 it gave me 7 hours. After looking at the edit formula box it was showing AM instead of PM. Is there anyway i can fix this without manually changing AM to PM for times after 12:00 pm.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting Time to a decimal and ...

    You could use =ROUND((B1-A1) * 96, 0) / 4 + (A1>A2) * 12, but that has its own set of warts. You'd be better off entering the times correctly.

+ 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