How Add or Subtract Specific Years, Months and Days to a Date in Excel?


Adding or subtracting the specific time from a date manually can be a complex problem if the time is a combination of days, months, and years in Excel. This can be done in a very simple and efficient way using the formula provided by Excel. This tutorial will help us understand how we can add or subtract from a date.

Here, we will first use the formula to get the first result, then use the autofill handle to complete the task. Let us see a simple process to add or subtract a given time from the list of dates in Excel.

Step 1

Let us consider the below data to which we want to add or subtract 2 years, 4 months, and 13 days. The data is shown in the below screenshot.

Here we can use the formula as

= DATE(YEAR(date) + number of years, MONTH(date) + number of months, DAY(date) + number of days) to adding the time to date

= DATE(YEAR(date) - number of years, MONTH(date) - number of months, DAY(date) - number of days) for subtracting the time from the date

Step 2

In our case to add or subtract 2years 4months 13 days the formula will be −

To add − =DATE(YEAR(A2)+2,MONTH(A2)+4,DAY(A2)+13)

To subtract − =DATE(YEAR(A2)-2,MONTH(A2)-4,DAY(A2)-13)

Now enter the formulas in two different cells and click on Enter to get the first result, as shown in the below screenshot.

We can get all the other results just by dragging down from the first result until all our results are filled, and our final will look similar to the below image.

Using the same process, we can not only add or subtract 2 years, 4 months, and 13 days from any date in Excel, but we can also add or subtract any given duration from any date.

Conclusion

In this tutorial, we used a simple example to demonstrate how you can add or subtract specific years, months, and days (2 years, 4 months, and 13 days) to a date in Excel to highlight a particular set of data.

Updated on: 04-Jan-2023

599 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements