Determine Length of Service

T

TheLeafs

Good day,

I am tring to determine in VBA the length of service employees have
been with a company in months. For example, how many months is
between:
05/01/02
02/03/06
I am looking to set this up in a Macro, I can understand how to do this
in days but not months.
startdate = Sheets("Main").Cells(5, 4)
LOS = Now - sdate
I was wondering if anyone can assist me with this.

Thanks
 
T

Tom Ogilvy

? datediff("m",DateValue("05/01/02"),DateValue("02/03/06"))
45

Should give you some Ideas. Read the help and then test it on some dates
to see if your intepretation of months matches its interpretation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top