Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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
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
Advanced Sum or marco needed???? JMK Excel Worksheet Functions 4 November 4th 07 01:38 AM
Advanced Sumif formula Eva Excel Worksheet Functions 7 June 30th 07 02:04 AM
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) shadestreet Excel Discussion (Misc queries) 2 July 21st 06 03:04 PM
Advanced cell validation help needed pls Bullman Excel Discussion (Misc queries) 8 June 5th 06 02:16 PM
Advanced Formula... Steven Sinclair Excel Discussion (Misc queries) 2 November 14th 05 08:26 PM


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

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

About Us

"It's about Microsoft Excel"