Thread: subtract dates
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
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.