+ Reply to Thread
Results 1 to 2 of 2

Calculating weeks/days old if child is less than 1 month or 1 week old.

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    66

    Calculating weeks/days old if child is less than 1 month or 1 week old.

    I am currently using =IF(DATE(YEAR(I3)+2,MONTH(I3),DAY(I3))-Q3>0,DATEDIF(I3,Q3,"m") & " m ",DATEDIF(I3,Q3,"y") & " y ")
    I need to calculate weeks old if less than a month and days old if less than a week.

    See my old thread:
    http://www.excelforum.com/excel-form...=1#post3033638

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,730

    Re: Calculating weeks/days old if child is less than 1 month or 1 week old.

    You could add the things in red to your formula:

    =IF(Q3-I3<7,Q3-I3 & "days",IF(Q3-I3<30,INT((Q3-I3)/7) & "wks",IF(DATE(YEAR(I3)+2,MONTH(I3),DAY(I3))-Q3>0,DATEDIF(I3,Q3,"m") & " m ",DATEDIF(I3,Q3,"y") & " y ") ))

    Hope this helps.

    Pete

+ 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