Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Advanced Sum or marco needed???? | Excel Worksheet Functions | |||
Advanced Sumif formula | Excel Worksheet Functions | |||
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) | Excel Discussion (Misc queries) | |||
Advanced cell validation help needed pls | Excel Discussion (Misc queries) | |||
Advanced Formula... | Excel Discussion (Misc queries) |