ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Subtract MM/DD/YYYY and get # months (https://www.excelbanter.com/excel-discussion-misc-queries/44692-subtract-mm-dd-yyyy-get-months.html)

Carole O

Subtract MM/DD/YYYY and get # months
 
I have a vacation earning chart where employees earn xx hours per pay period.
When they have worked over xx months, they earn yy hours per pay period. I
need a way to subtract their start date from the currend end-of-pay-period
date to see where they fall in the leave earning chart - the catch is the
answer has to be in months.

I'm using Excel 2003. Any ideas?

TIA,

Carole O

David Billigmeier

=DATEDIF(start_date,end_date,"m") will give you the number of months between
start_date and end_date
--
Regards,
Dave
<!--


"Carole O" wrote:

I have a vacation earning chart where employees earn xx hours per pay period.
When they have worked over xx months, they earn yy hours per pay period. I
need a way to subtract their start date from the currend end-of-pay-period
date to see where they fall in the leave earning chart - the catch is the
answer has to be in months.

I'm using Excel 2003. Any ideas?

TIA,

Carole O


Duke Carey

To answer your question with a question: What is a month?

Is it 28 days, 30, 31, or some other means of declaring a month?

It's probably a trivial question until you compare a start date on the 31st
of a month to a pay date on Sept 30, or Feb 28. Has the employee earned that
month of service?

"Carole O" wrote:

I have a vacation earning chart where employees earn xx hours per pay period.
When they have worked over xx months, they earn yy hours per pay period. I
need a way to subtract their start date from the currend end-of-pay-period
date to see where they fall in the leave earning chart - the catch is the
answer has to be in months.

I'm using Excel 2003. Any ideas?

TIA,

Carole O


Dave Peterson

If you're gonna use =datedif(), you can find lots of info at Chip Pearson's
site:
http://www.cpearson.com/excel/datedif.htm

(=datedif() was only document in xl2k's help.)

Carole O wrote:

I have a vacation earning chart where employees earn xx hours per pay period.
When they have worked over xx months, they earn yy hours per pay period. I
need a way to subtract their start date from the currend end-of-pay-period
date to see where they fall in the leave earning chart - the catch is the
answer has to be in months.

I'm using Excel 2003. Any ideas?

TIA,

Carole O


--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com