Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jessica
 
Posts: n/a
Default Date minus 3 months

Hi Everyone,

I adapted this formula from the 'date plus 1 month' question.

=MIN(DATE(YEAR(D17),MONTH(D17)+{-1,-3},DAY(D17)*{0,1}))

The only problem is the {0,1} in the days. When I input 7/31/06 into D17, I
get 5/1/06 as my result, when I want to get 4/30/06.

Also when I input 5/31/06 into D17, I get 3/3/06, when I want to get 2/28/06.

Any suggestions? Also, I have no idea what those {} brackets are
doing...anyone have an explanation?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Date minus 3 months

Jessica

Try one of these

=MIN(DATE(YEAR(D17),MONTH(D17)+{-2,-3},DAY(D17)*{0,1}))

or (this one requires the Analysis Toolpak addin to be enabled)
=EDATE(D17,-3)


Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Jessica" wrote:

Hi Everyone,

I adapted this formula from the 'date plus 1 month' question.

=MIN(DATE(YEAR(D17),MONTH(D17)+{-1,-3},DAY(D17)*{0,1}))

The only problem is the {0,1} in the days. When I input 7/31/06 into D17, I
get 5/1/06 as my result, when I want to get 4/30/06.

Also when I input 5/31/06 into D17, I get 3/3/06, when I want to get 2/28/06.

Any suggestions? Also, I have no idea what those {} brackets are
doing...anyone have an explanation?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paul Mathews
 
Posts: n/a
Default Date minus 3 months

Hi Jessica, try this:

=EOMONTH(E9,-3)

"Jessica" wrote:

Hi Everyone,

I adapted this formula from the 'date plus 1 month' question.

=MIN(DATE(YEAR(D17),MONTH(D17)+{-1,-3},DAY(D17)*{0,1}))

The only problem is the {0,1} in the days. When I input 7/31/06 into D17, I
get 5/1/06 as my result, when I want to get 4/30/06.

Also when I input 5/31/06 into D17, I get 3/3/06, when I want to get 2/28/06.

Any suggestions? Also, I have no idea what those {} brackets are
doing...anyone have an explanation?

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jessica
 
Posts: n/a
Default Date minus 3 months

THANKS! Ron & Paul. Unfortunantly I can't use the tool pack as I am sending
this to a client with limited excel knowledge! Ron's formula worked
perfectly!

"Jessica" wrote:

Hi Everyone,

I adapted this formula from the 'date plus 1 month' question.

=MIN(DATE(YEAR(D17),MONTH(D17)+{-1,-3},DAY(D17)*{0,1}))

The only problem is the {0,1} in the days. When I input 7/31/06 into D17, I
get 5/1/06 as my result, when I want to get 4/30/06.

Also when I input 5/31/06 into D17, I get 3/3/06, when I want to get 2/28/06.

Any suggestions? Also, I have no idea what those {} brackets are
doing...anyone have an explanation?

Thanks.

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
Manipulating dates (was Add 6 months to a date) Bill Ridgeway New Users to Excel 2 March 31st 06 07:46 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
How to Highlight the date if it is within 3 months from now HR gal Excel Worksheet Functions 2 December 10th 05 04:10 AM
date (minus) date = working days diff jjj Excel Discussion (Misc queries) 3 December 6th 05 03:16 PM
Use a calc to figure sum in months using date fields but numeric r susiespassion Excel Worksheet Functions 8 February 6th 05 11:32 PM


All times are GMT +1. The time now is 10:03 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"