# Date manipulation

#### kolly

##### New Member
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

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### Dave Patton

##### Well-known Member
=date(year(d1),month(d1)+d2,day(d1))

#### barry houdini

##### MrExcel MVP
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}))

#### kolly

##### New Member
You guys are great. It worked.

Thank you

Replies
17
Views
326
Replies
6
Views
187
Replies
6
Views
577
Replies
5
Views
495
Replies
1
Views
339

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,559
Messages
5,832,488
Members
430,136
Latest member
Asir Jefferson

### 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.

### Which adblocker are you using?

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

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