Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 -- TheLeafs ------------------------------------------------------------------------ TheLeafs's Profile: http://www.excelforum.com/member.php...o&userid=10131 View this thread: http://www.excelforum.com/showthread...hreadid=508253 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
? 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. -- Regards, Tom Ogilvy "TheLeafs" wrote in message ... 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 -- TheLeafs ------------------------------------------------------------------------ TheLeafs's Profile: http://www.excelforum.com/member.php...o&userid=10131 View this thread: http://www.excelforum.com/showthread...hreadid=508253 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating Average Length of Service | Excel Worksheet Functions | |||
Function to calculate the Length of Service of an Employee | Excel Worksheet Functions | |||
Calculate Months to Determine Length of Service | Excel Worksheet Functions | |||
Employee Length of Service | Excel Worksheet Functions | |||
Length of Service | Excel Worksheet Functions |