Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jrh jrh is offline
external usenet poster
 
Posts: 14
Default subtract dates

Hi. I need to do an if then formula that applies a
formula if two dates are within 9 months of each other or
does not apply the formula if they are 9 months or greater
apart. How do I do this? I can't just base it off of a
straight # of days X 9 because of the different days in a
month.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default subtract dates

Hi
try (if A1 and A2 stores your dates)
=IF(OR(DATEDIF(A1,A2,"m")<9,AND(DATEDIF(A1,A2,"m") =9,DATEDIF(A1,A2,"md"
)=0)),your_formula,"")

--
Regards
Frank Kabel
Frankfurt, Germany

jrh wrote:
Hi. I need to do an if then formula that applies a
formula if two dates are within 9 months of each other or
does not apply the formula if they are 9 months or greater
apart. How do I do this? I can't just base it off of a
straight # of days X 9 because of the different days in a
month.

Thank you.


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
TODAY, Subtract a List of Dates from... DOUG ECKERT[_2_] Excel Discussion (Misc queries) 2 November 6th 08 07:21 PM
Subtract if dates in the range between 2 dates. inta251 via OfficeKB.com Excel Worksheet Functions 2 March 1st 07 04:40 AM
How to subtract 2 dates to get number of days.....please Nick Excel Worksheet Functions 3 November 10th 06 01:03 PM
Subtract two dates Joe Excel Discussion (Misc queries) 2 February 8th 06 02:57 AM
Subtract time and dates with restrictions Michaela Excel Worksheet Functions 2 February 7th 05 04:21 PM


All times are GMT +1. The time now is 10:23 PM.

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

About Us

"It's about Microsoft Excel"