Module 9 · Dates and Times · Years with the company

Wei Chen owns Spark & Shine Cleaning

Wei wants to thank his team. Some people have worked for him for many years. Their start dates are in three formats on old paper forms. Now the dates are in Excel, and Wei wants the years and months for each person.

Loading the spreadsheet…

Module 9 · Dates and Times

Years with the company

Wei Chen, owns Spark & Shine Cleaning
Wei Chen owns Spark & Shine Cleaning

Wei wants to thank his team. Some people have worked for him for many years. Their start dates are in three formats on old paper forms. Now the dates are in Excel, and Wei wants the years and months for each person.

Steps

  1. Count full years with DATEDIF

    DATEDIF counts the time between two dates. With "y", it counts the full years.

    How to do it

    1. Select the cell for the result.
    2. Type =DATEDIF( and the earlier date and the later date, with commas.
    3. Type the unit in quotes and a closing bracket.
    4. Press Enter.
    5. Other units: "m" counts full months, "d" counts days.
    6. To copy the formula down, write today as $I$4.

    =DATEDIF(C5,I4,"y")

    Task: Count the full years for Grace. Put the result in cell D7.

  2. Count the months after the full years

    With "ym", DATEDIF counts the months after the last full year. Years and months together give the full time.

    How to do it

    1. Click cell E5.
    2. Type the same formula with the unit "ym".
    3. Press Enter.

    =DATEDIF(C5,I4,"ym")

    Task: Count the extra months for Tomasz. Put the result in cell E6.