+ Reply to Thread
Results 1 to 4 of 4

display a number as weeks and days?

Hybrid View

  1. #1
    Registered User
    Join Date
    01-11-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    30

    display a number as weeks and days?

    I have a start date and an end date in my sheet, in another column I have used the NETWORKDAY function to return the difference excluding weekends and holidays. is there a way I can get this number to be displayed as weeks and days, in seperate columns if need be.

    I did consider /5 and returning the result with 1 decimal place to a work cell that would not be displayed. Then creating 2 new columns 'days' and 'weeks' so if the the result in the work cell was 6.2 say that would equate to 6weeks 1day.

    In the days column I would then use something like =if(workcell=*.2,"1",if(workcell=*.4,"2", and so on (the syntax is probably incorrect here)

    and in the weeks column I would return the number rounded down to the whole number giving me the number of week.

    Is there a better way?

    EDIT:the * is for anynumber as I thought it was used as a wild card. maybe not!
    Last edited by di22y; 01-26-2009 at 06:48 PM.

  2. #2
    Registered User
    Join Date
    01-22-2009
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: display a number as weeks and days?

    Hi,

    I think you should try using the rounddown function. To find out the number of weeks try the formula.
    =ROUNDDOWN(C7/5,0)

    Where you replace C7 with the cell outputting the number of days. This will give you the number of weeks. The number of days can then be found from the formula:

    =C7-D7*5

    Where D7 is the cell containing the above formula.

    Hope that helps.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: display a number as weeks and days?

    With the NETWORKDAYS formula in C1 you could use this formula for weeks

    =INT(C1/5)

    and for days

    =MOD(C1,5)

    If you want you could cut out the intermediate step and put your NETWORKDAYS formula directly into the weeks and days, e.g.

    =INT(NETWORKDAYS(A1,B1)/5)

    and

    =MOD(NETWORKDAYS(A1,B1),5)

  4. #4
    Registered User
    Join Date
    01-11-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: display a number as weeks and days?

    Quote Originally Posted by daddylonglegs View Post
    With the NETWORKDAYS formula in C1 you could use this formula for weeks

    =INT(C1/5)

    and for days

    =MOD(C1,5)

    If you want you could cut out the intermediate step and put your NETWORKDAYS formula directly into the weeks and days, e.g.

    =INT(NETWORKDAYS(A1,B1)/5)

    and

    =MOD(NETWORKDAYS(A1,B1),5)

    Spot On

    Thank You.

+ 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