Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default 3 months prior and 3 months post a date

My sales training takes place on 2007/10.

How do I get excel to calculate in another column the 3 months prior to this
date and the 3 months post this date.

i.e. 2007/09
2007/08
2007/07
2007/11
2007/12
2008/01


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 3 months prior and 3 months post a date

Hi,

Asssuming a properly formatted date in A1 try this

=DATE(YEAR(A1),MONTH(A1)+3,DAY(A1))

Change +3 to -3 for 3 months previous

Mike

"renee" wrote:

My sales training takes place on 2007/10.

How do I get excel to calculate in another column the 3 months prior to this
date and the 3 months post this date.

i.e. 2007/09
2007/08
2007/07
2007/11
2007/12
2008/01


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default 3 months prior and 3 months post a date

=LEFT(A20,4)+(--RIGHT(A20,LEN(A20)-FIND("/",A20))9)&"/"&(RIGHT(A20,LEN(A20)-FIND("/",A20))+3)-(--RIGHT(A20,LEN(A20)-FIND("/",A20))9)*12

and

=LEFT(A20,4)-(--RIGHT(A20,LEN(A20)-FIND("/",A20))<4)&"/"&(RIGHT(A20,LEN(A20)-FIND("/",A20))-3)+(--RIGHT(A20,LEN(A20)-FIND("/",A20))<4)*12

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"renee" wrote in message
...
My sales training takes place on 2007/10.

How do I get excel to calculate in another column the 3 months prior to
this
date and the 3 months post this date.

i.e. 2007/09
2007/08
2007/07
2007/11
2007/12
2008/01




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
date + 6 months [email protected] Excel Worksheet Functions 3 February 13th 08 08:48 PM
Adding months to dates should account for 28-30-31 day months Graham Excel Worksheet Functions 3 February 1st 06 12:06 PM
converting months to years and months??? Marty Excel Discussion (Misc queries) 1 February 18th 05 02:38 AM
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
sum values between today and 6 months prior Qaspec Excel Worksheet Functions 3 January 19th 05 08:17 PM


All times are GMT +1. The time now is 05:22 PM.

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"