Date manipulation

kolly

New Member
Joined
Mar 11, 2009
Messages
20
I want to first of all thank Yard for his wonderful solution to my earlier problem. - Yard, you too much!
My question now is, If I have 03-March-2009 in cell D1 and D2 has the value 2, how can I add up D1 and D2 to produce 03-May-2009. I mean I want (03/03/2009)+2=03/05/2009, (02/04/2008)+5=02/09/2008, (25/10/2008)+7=25/05/2009, etc
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,569
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
=date(year(d1),month(d1)+d2,day(d1))
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
If D1 is 31/08/2008 and D2 is 6 what should the answer be? Dave's formula will give 03/03/2009

This formula will give 28/02/2009

=EDATE(D1,D2)

although EDATE is an Analysis ToolPak function. To get the same result with native functions

=MIN(DATE(YEAR(D1),MONTH(D1)+D2+{0,1},DAY(D1)*{1,0}))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,964
Messages
5,599,069
Members
414,281
Latest member
Engjamal2021

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
Top