Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - finding date with a number of months from today 2

Status
Not open for further replies.

smooveb

IS-IT--Management
Jul 20, 2001
161
US
Hi everyone,

I'm thinking someone will probably figure this out fairly easily. I have two columns with data:

Production Date (usually the first day of a certain month)
- examples would include 8/1/2008 or 12/1/2008

Then I have a number of months until Expiry (Expiry Months)
- examples would include, 1, 20, or 24

In the third column, I need to find the expiry date, based on the number of expiry months between it and the production date (first column). I could use 30 days/month and work something out, but it needs to be 100% accurate. Any ideas?

Thanks in advance!
Barrett
 
If your date is in A1

=Date(Year(A1),Month(A1)+20,Day(A1))

will add 20 months to your date in A1

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi,

Maybe you could use this format?

Example cells:
A1 = 6/9/2007
A2 = 9/2/2007
A3 = 12/10/2008

Example formulas:
Months occurring between two dates in the same year
=MONTH(A2)-MONTH(A1)

Months occurring between two dates over a year apart
=(YEAR(A3)-YEAR(A2))*12+MONTH(A3)-MONTH(A2)

Hope this helps,



Best,
Blue Horizon [2thumbsup]
 


[tt]
A B C
Production Date Expiry Months Expiry Date
8/1/2008 20 =Date(Year(A2),Month(A2)+B2,Day(A2))
12/1/2008 2
[/tt]
CAVEAT: Since you state that the Production Date is USUALLY the first, I would caution you against it being anything greater than the twentyeighth of the month.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi, can you just use =EDATE(A2,20) OR =EDATE(A2,B2)?

Yuri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top