VBA: Calculating number of years, months and days between tw

  • Good evening everyone,

    I am working on developing an employee evaluation module that will be used during employee performance reviews to determine raises and such. In an employees first year, they are called in for three such reviews - 3 months, 6 months and 1 year point, then every year on the anniversary thereof. Basically, what I would like to do, at least in line with the topic of this posting is this:

    First, I would like to have a reminder system so that the program compares each employee's start date against the current date and will pop up a msgbox or something similar reminding one month prior of their review date so that it can be scheduled in.

    Second, upon the date of any given employee's review, it will again be comparing between the employee's start date and the current date to determine which review session they are in for.

    I know that I had seen similar posts in the past, but I did a couple of searches using different search parameters and was unable to find them. Any help on this will be greatly appreciated. :)

  • Thank you for your reply. I played around a bit using the DATEDIF function, but it lacks the versatility that I am looking for. I might play with it some more once I get home, but I would still like for having a VBA solution as well so that I can compare between the two.

  • Hi Dr

    I use a formula for telling how long a staff member worked for me.

    Try =(DAYS360(A1,B1))/30

    A1 = Start Date
    B1 = End Date.

    Hope this helps

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!