View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Advanced IF Formula help needed

With your dates in starting date A1 and end date in B1; try the below formula

=IF(B1-A1365,"X","N" & YEAR(A1))


If this post helps click Yes
---------------
Jacob Skaria


"EileenR" wrote:

Hi,

I would like to create a formula that does the following: calculate the
number of days between dateA and dateb. If the number of days between the 2
are more than 365 then it would return "X". If the number of days are less
than 365 it would return "N2008" if the year in dateA was 2008 or "N2009" if
the year in dateA was 2009. (eg: if dateA was 8-1-2008 it would return
"N2008", if dateA was 3/31/09 it would retun "N2009"
--
Thanks!

EileenR