+ Reply to Thread
Results 1 to 5 of 5

Age in Months taking data from two columns

  1. #1
    Registered User
    Join Date
    05-11-2013
    Location
    Haleine, France
    MS-Off Ver
    Excel 2007
    Posts
    3

    Age in Months taking data from two columns

    Hello,
    I hope you can assist me, I have read through the many postings similar to this but haven't found a solution for me.
    To explain:-
    I have a spreadsheet which has a child's month of birth in column F and year of birth in Column G, the data is selected from a list
    I also have 2 cells at the top, one showing the current month cell K3 =MONTH(TODAY()) and the other the current year cell L3 =NOW().
    I want in a third column to be able to calculate the child's age in months.
    I can do this using a date of birth but I am not allowed to record that. I can also do this if I manually change the current month and year but I wanted that to be automatically populated.

    I hope that makes sense, any help would be very much appreciated,
    many thanks
    Maid Marion

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

    Re: Age in Months taking data from two columns

    do you assume all children start at 1st of month? so its inclusive 1/1/2012 or 31/1/2012 to month of today would be the same?
    =DATEDIF(DATE(G1,F1,1),today(),"m")
    Last edited by martindwilson; 05-11-2013 at 08:57 AM.
    "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

  3. #3
    Registered User
    Join Date
    05-11-2013
    Location
    Haleine, France
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Age in Months taking data from two columns

    Yes, it doesn't matter where in the month the birthday falls.

    Thanks for replying so quickly

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

    Re: Age in Months taking data from two columns

    hmm maybe
    =DATEDIF(DATE(G3,F3,1),EOMONTH(TODAY(),0),"m") that calculates from 1 of any month to last day of current month
    if you want up to last day of last month
    =DATEDIF(DATE(G3,F3,1),EOMONTH(TODAY(),-1),"m")

  5. #5
    Registered User
    Join Date
    05-11-2013
    Location
    Haleine, France
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Age in Months taking data from two columns

    Wow, thank you so much and so quick. I have been struggling for hours!
    I assume I can now get rid of the current month and current year cells as they are not needed using your formula.

    Thanks again
    Maid Marion

+ 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