ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Todays date plus 3 months & less 3 months (https://www.excelbanter.com/excel-programming/376451-todays-date-plus-3-months-less-3-months.html)

Les Stout[_2_]

Todays date plus 3 months & less 3 months
 
Hi, i can get todays date but need to add 3 months to it and the other
way too.

Any help would be much appreciated.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

JLGWhiz

Todays date plus 3 months & less 3 months
 
=TODAY()+90 ' (= 1/30/2007)
=TODAY()-90 ' (=8/3/2006 )
"Les Stout" wrote:

Hi, i can get todays date but need to add 3 months to it and the other
way too.

Any help would be much appreciated.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***


[email protected]

Todays date plus 3 months & less 3 months
 
Use DateAdd, like this:

DateAdd ("m", 3, now())
DateAdd("m", -3, now())

HTH,
Dom



Les Stout wrote:
Hi, i can get todays date but need to add 3 months to it and the other
way too.

Any help would be much appreciated.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***



JLGWhiz

Todays date plus 3 months & less 3 months
 
Also see "Add Dates" in Excel Help.

"Les Stout" wrote:

Hi, i can get todays date but need to add 3 months to it and the other
way too.

Any help would be much appreciated.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***


Jim Jackson

Todays date plus 3 months & less 3 months
 
This will give an exact 3 month period.

IntervalType = "m"
Number = 3

ActiveSheet.Range("E17") = _
DateAdd(IntervalType, Number + 3, Range("E10"))
ActiveSheet.Range("E18") = _
DateAdd(IntervalType, Number - 3, Range("E10"))

--
Best wishes,

Jim


"Les Stout" wrote:

Hi, i can get todays date but need to add 3 months to it and the other
way too.

Any help would be much appreciated.

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***



All times are GMT +1. The time now is 06:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com