Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determine Length of Service


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Determine Length of Service

? 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Average Length of Service EasyPeasy Excel Worksheet Functions 3 May 17th 23 07:44 PM
Function to calculate the Length of Service of an Employee Grd Excel Worksheet Functions 8 November 16th 09 09:22 AM
Calculate Months to Determine Length of Service WilliamsDeLisle Excel Worksheet Functions 11 April 13th 09 09:51 PM
Employee Length of Service Kim Excel Worksheet Functions 5 December 22nd 08 02:39 PM
Length of Service Dom Excel Worksheet Functions 7 July 17th 06 10:47 PM


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"