ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Advanced IF Formula help needed (https://www.excelbanter.com/excel-discussion-misc-queries/236231-advanced-if-formula-help-needed.html)

EileenR

Advanced IF Formula help needed
 
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

Jacob Skaria

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


Eduardo

Advanced IF Formula help needed
 
Hi,
=IF(+B2-A2365,"X",IF(AND(+B2-A2<365,YEAR(A2)=2008),"N2008",IF(AND(+B2-A2<365,YEAR(A2)=2009),"N2009")))

"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


David Biddulph[_2_]

Advanced IF Formula help needed
 
You don't need the + signs.
--
David Biddulph

"Eduardo" wrote in message
...

Hi,
=IF(+B2-A2365,"X",IF(AND(+B2-A2<365,YEAR(A2)=2008),"N2008",IF(AND(+B2-A2<365,YEAR(A2)=2009),"N2009")))

"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





All times are GMT +1. The time now is 05:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com