ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula for Recalculated Employment Dates (https://www.excelbanter.com/excel-discussion-misc-queries/199552-formula-recalculated-employment-dates.html)

G-Bart

Formula for Recalculated Employment Dates
 
Hi,

I need to calculate the days between two dates (inclusive) then subtract the
result from a third date and return a fourth date. For example, a person
hired at company X on 7/20/2006 & left company X on 2/1/07 had 196 days of
employment (2/1/07 €“ 7/20/06 equals 196 (if my math is correct)). The same
person was rehired on 7/31/08 and I need to subtract 196 days from 7/31/08
which should return a date value of 1/18/08. What is the most accurate
formula to use which will take into account months that have 28, 30, and/or
31 days?

Thanks in advance!


Jim Thomlinson

Formula for Recalculated Employment Dates
 
Dates in XL ar actually stored as long integers. If you reformat a date to
number you will actually see a number of about 39,000... So knowing that the
math is very straight forward.
In A1 put 7/20/2006
In B1 put 2/1/2007
In C1 put 7/31/2008

In any other cell put the formula =C1-(B1-A1)
which results in 39464 which when formatted as a date is 1/17/2008
So you might need to check the math at your side to confirm the correct
date...
--
HTH...

Jim Thomlinson


"G-Bart" wrote:

Hi,

I need to calculate the days between two dates (inclusive) then subtract the
result from a third date and return a fourth date. For example, a person
hired at company X on 7/20/2006 & left company X on 2/1/07 had 196 days of
employment (2/1/07 €“ 7/20/06 equals 196 (if my math is correct)). The same
person was rehired on 7/31/08 and I need to subtract 196 days from 7/31/08
which should return a date value of 1/18/08. What is the most accurate
formula to use which will take into account months that have 28, 30, and/or
31 days?

Thanks in advance!



All times are GMT +1. The time now is 05:11 PM.

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