Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default 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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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 ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default 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 ***


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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 ***

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default 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 ***

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating months with half months. adelaide Excel Discussion (Misc queries) 1 June 6th 08 08:36 PM
3 months prior and 3 months post a date renee Excel Worksheet Functions 2 May 2nd 08 05:46 PM
Adding months to dates should account for 28-30-31 day months Graham Excel Worksheet Functions 3 February 1st 06 12:06 PM
How do i change 15 months to read 1 year and 3 months? Marty Excel Discussion (Misc queries) 1 February 17th 05 11:21 PM
Dates to months and calculating values for their months jigsaw2 Excel Programming 1 September 5th 03 01:35 PM


All times are GMT +1. The time now is 11:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"