please help me add 1, 2 or 3 years to a date in Excel (O365)

stevewest

New Member
Joined
Oct 22, 2018
Messages
1
Hi All

I have a spreadsheet with dates in it that i would like to add either 1, 2 or 3 years to. There is a cell that lists if the customer bought a 1, 2 or 3 year licence so i need the formula to check that cell and then add the number of years.

I started with this =DATE(YEAR(F2)+1,MONTH(F2),DAY(F2)) but i can't make a formula that checks a cell and then adds that number of years.

Any help or advice would be most welcome. Thank you
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Welcome to the Board!

You have practically done it. Just replace the "1" with a cell reference (where you are storing the number of years).
If that was A1, it would look like:
Code:
[COLOR=#333333]=DATE(YEAR(F2)+[/COLOR][COLOR=#ff0000][B]A1[/B][/COLOR][COLOR=#333333],MONTH(F2),DAY(F2))[/COLOR]
 
Upvote 0
Cross posted https://www.excelforum.com/excel-fo...d-1-2-or-3-years-to-a-date-in-excel-o365.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Or you could just use EDATE, where A1 contains the number of years you want to add:
=EDATE(F2,12*A1)

Format as date.
 
Upvote 0
Try =F2+(A2*365.25)
I would not recommend that approach, as it could lead to inaccurate results, and introduces an unintended time component.

For example, enter you have date 1/1/2018 in F2 and 1 in A2, you will get:
1/1/2019 6:00 AM

Note the time component. That is because date and times are stored as numbers, specifically the number of days since 1/0/1900, and time is represented as fractions of one day.
So .25 is one-fourth of one day. Since there are 24 hours in a day, that would translate to 6:00 AM

Also, consider what happens if you date span contains a leap year, i.e. F2 is 1/1/2016 and A2 is 1.
That formula would return:
12/31/2016 6:00 AM

Not only does it contain an unwanted time piece, but it actually is not the correct day.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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