+ Reply to Thread
Results 1 to 5 of 5

Decimal days

  1. #1
    Registered User
    Join Date
    12-02-2005
    Posts
    4

    Decimal days

    Hi
    Newish to Excel, so apologies if this a really stupid post.
    Doing an annual leave calculator which gives as one its results the decimal figure of, for example, 33.5 days, i.e. thirty three and a half days.
    How can I convert this to read 33 days and 12 hours? Have tried all sorts to no avail.
    Many thanks
    Cliff

  2. #2
    Max
    Guest

    Re: Decimal days

    "cliffbellis766@" wrote:
    > .. Doing an annual leave calculator which gives as one its results the
    > decimal figure of, for example, 33.5 days,
    > i.e. thirty three and a half days.
    > How can I convert this to read 33 days and 12 hours?


    One way which might suffice ..

    Assuming the results (33.5, etc) are in A2 down

    Put in B2:
    =IF(A2=0,"",IF(A2=INT(A2),INT(A2)&" days",INT(A2)&" days and
    "&(A2-INT(A2))*24&" hours"))

    Copy down

    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  3. #3
    Max
    Guest

    Re: Decimal days

    Maybe try this slightly revised formula instead:

    Put in B2:
    =IF(A2=0,"",IF(A2=INT(A2),INT(A2)&" days",INT(A2)&" days and
    "&TEXT((A2-INT(A2))*24,"00")&" hours"))

    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --



  4. #4
    Roger Govier
    Guest

    Re: Decimal days

    Hi Cliff

    One way, with days in A1

    =INT(A1)&" days "&MOD((A1*24),24)&" hours"

    --
    Regards

    Roger Govier



    cliffbellis766@
    <[email protected]> wrote:
    > Hi
    > Newish to Excel, so apologies if this a really stupid post.
    > Doing an annual leave calculator which gives as one its results the
    > decimal figure of, for example, 33.5 days, i.e. thirty three and a
    > half days.
    > How can I convert this to read 33 days and 12 hours? Have tried all
    > sorts to no avail.
    > Many thanks
    > Cliff
    >
    >
    > --
    > cliffbellis766@
    > ------------------------------------------------------------------------
    > cliffbellis766@'s Profile:
    > http://www.excelforum.com/member.php...o&userid=29310 View
    > this thread: http://www.excelforum.com/showthread...hreadid=497313




  5. #5
    Registered User
    Join Date
    12-02-2005
    Posts
    4

    Decimal days

    Hello all
    Many, many thanks; now got it working. No wonder my brain cell was having problems working this one out.
    No more staff claiming extra minutes of undeserved leave! Hah! that'll teach 'em.
    Really grateful, although staff are preparing scaffold for me.
    Cliff

+ 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