Closed Thread
Results 1 to 8 of 8

Thread: Convert number to days

  1. #1
    Registered User
    Join Date
    03-02-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Convert number to days

    http://i154.photobucket.com/albums/s.../worksheet.jpg

    Cell E73 has this formula: =SUMIF(B13:B72,"Principal",E13:E72) and the same applies for the cells up to E79.

    I am trying to find a formula that will automatically calculate the figures from E73-E79 into F73-F79 and show the appropriate number of days.

    E.g: if there are 10 hours accumulated for the principal (cell E73), I would like cell F73 to read "1 day and 3 hours".

    1 day = 7.5 hours.

    I need to finish this by 12pm today (my boss is on my case about finding this formula) and any help would be greatly appreciated!

    *I am using 2003

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: Convert number to days

    Wouldn't that be 1 day and 2.5 hours? Try this in F73

    =INT(E73/7.5)&" day(s) and "&MOD(E73,7.5)&" hours"
    Audere est facere

  3. #3
    Registered User
    Join Date
    03-02-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Convert number to days

    You are a star! Thank you ssssoooo much! It works!

  4. #4
    Registered User
    Join Date
    03-02-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Convert number to days

    And yes, you are correct: that would work out to be 1 day and 2.5 hours!

  5. #5
    Registered User
    Join Date
    03-02-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Convert number to days

    Would you mind explaining in detail the formula for my own future reference?

    *I seriously cannot thank you enough!

  6. #6
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2003, Excel 2007 (Portable)
    Posts
    388

    Re: Convert number to days

    One thing
    You have posted an excel thread in word forum.
    Any way

    =INT(E73/7.5)&" day(s) and "&MOD(E73,7.5)&" hours"

    The INT function calculates the integer part of the "E73/7.5" i.e if it is 10/7.5 it will give

    1. Integer part of (1.333).

    "day(s)" and "hours" are inserted as text with the help of "&".

    The mod function return the remainder of the 10/7.5 i.e hours remained.

    Regards
    Mahju

    Mark the thread as solved if you are satisfied with the answer

    Rule 9
    Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  7. #7
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: Convert number to days

    Quote Originally Posted by mahju View Post
    You have posted an excel thread in word forum.
    D'oh! Thanks mahju, I didn't spot that - moved to Excel general
    Audere est facere

  8. #8
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,637

    Re: Convert number to days

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

Closed 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.2.0