Calculating Dates

aidanlukecole

New Member
Joined
Sep 23, 2011
Messages
5
If I have a date in column A, and I want column B to show a date 2 years and 9 months after the date in column A, what formula do I use?

ie: Column A has the date 6/15/08. I want Column B to automatically calculate the date 2 years and 9 months after 6/15/08 (which would be 3/15/2011.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi aidanlukecole, welcome to the board.
A couple ways to do this. (Both assume your date is in A1...)
1) Quick & dirty:
Since we know that 2 years & 9 months equals 1003 days (most years) you might get away with just using:
Code:
=A1+1003
2) More robust, and will take leap years into account...
Code:
=DATE(YEAR(A1)+2,MONTH(A1)+9,DAY(A1))
Hope it helps.
 
Upvote 0
Thank you so much! Perfect. One additional question: I can't remember how you apply a formula to an entire column. In other words, lets say Column A includes 10 rows worth of dates. I want to apply that formula to all corresponding 10 rows of Column B. Can you tell me how to do that . . . Many thanks!
 
Upvote 0
Another option would be add 33 months using EDATE, e.g.

=EDATE(A1,33)

for dates at the end of the month that can give different results than

=DATE(YEAR(A1)+2,MONTH(A1)+9,DAY(A1))

e.g. if A1 = 31-May-2011 then EDATE formula gives 28-Feb-2014 but the other one gives 3-Mar-2014
 
Upvote 0
Sure. (and you're going to be sorry you asked :).... but)
Copy & paste the posted formula into cell B1.
Copy that cell and highlight the entire range you want to paste the formula into and just paste. (The formula is using relative cell addressing so the formula in row 2 will update itself to be:
Code:
=DATE(YEAR(A[COLOR=Red]2[/COLOR])+2,MONTH(A[COLOR=Red]2[/COLOR])+9,DAY(A[COLOR=Red]2[/COLOR]))
the formula in row 3 should be:
Code:
=DATE(YEAR(A[COLOR=Red]3[/COLOR])+2,MONTH(A[COLOR=Red]3[/COLOR])+9,DAY(A[COLOR=Red]3[/COLOR]))
and so on.

Is that what you meant?
 
Upvote 0
New question: What if I have 10 rows of dates in column A and 10 rows of dates in column B. I need a formula for column C that will take the earlier of the two dates in a row (either the one in column A or the one in column B), and then calculate a date that is 2 years 9 months from that earlier date. For example, A1 has the date 7/15/02 and B1 has 4/20/01. Column C should be 01/20/04.
 
Upvote 0
If you use the formula suggested by Halface you can modify that so that in place of all the A1s in the formula you use MIN(A1,B1), i.e.

=DATE(YEAR(MIN(A1,B1))+2,MONTH(MIN(A1,B1))+9,DAY(MIN(A1,B1)))

or using EDATE as per my suggestion

=EDATE(MIN(A1,B1),33)
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,183
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top