View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Advanced expiry date calculations

I'm a little confused by your "3 months prior" limitation. Do you mean if
John Doe tried to renew (extend) his license for another year four months
prior to the expiration date, you wouldn't let him? With that said, you can
set up an IF test to see if the date is within 3 months of the expiration
date and simple add one year to the expiration date to get the new
expiration date (not sure why you are trying to add remaining days in
current license... a renewal for 1 year extends the expiration date by 1
year, no matter when it is implemented (within your 3 month restriction),
right... or am I missing something in your question? To get the date a year
from a given date, just use the DATE function something like this...

Assuming E2 contains the old expiration date, put the formula for the new
expiration date in, say, F2...

=DATE(YEAR(E2)+1,MONTH(E2),DAY(E2))

--
Rick (MVP - Excel)


"Torfinn Brokke" wrote in message
...
Hello!

I asked some questions earlier today in another thread regarding the
calculation of expiry dates in Excel (the thread name is "Problem with
"IF"
function"), but I have run into a new issue that is so complex (to me, at
least) that I chose to make a new thread about it.

I have successfully made a worksheet that will give a warning when an item
is about to expire. Here is an example:

John Doe has a license that will expire on August 31st, 2009. On August
12th, 2009 he renews his license. This renewal lasts for 12 months plus
the
remainder of the last month, in this case until August 31st, 2010.

I have been able to calculate this in Excel with relative ease. But here
is
the new challenge I'm facing:

John Doe has a license that will expire on September 30th, 2009. He can
renew this license at any time in the three months preceding expiry (i.e.
from July 1st, 2009 to September 30th, 2009) and have the license renewed
until September 30th, 2010. In other words the duration of the license
will
be 12 months from September 30th, 2009 plus any number of days up to three
months before September 30th, 2009.

I hope this explanation is understandable. If not, I'll try to explain it
better. My question is: Can this calculation be done in Excel?

Thanks in advance for any help!