#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Nested formula

Cell A1 contains a date and is formatted as a date
Cell B1 should show the text NO COMPETENCY if A1 is blank, however, if A1 is
populated with a date, B1 should equal A1+(365*2)
Cell C1 should be blank if A1 is blank, however, if the date in B1 is less
than TODAY() display "EXPIRED", otherwise display "VALID".
I have tried to use IF and OR functions to do this but I obviously have the
syntax wrong is it merely returns VALUE#! for any option.
HELP!!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Nested formula

In cell B1 use this formula:

=IF(A1<"",DATE(YEAR(A1),MONTH(A1),DAY(A1)+(365*2) ),"No Competency")

In cell C1 use this formula:

=IF(A1<"",IF(TODAY()A1,"Expired","Valid"),"")

I'm not sure the significance of the (365*2) portion in the first formula,
but if you want to add 2 years, then you could just use YEAR(A1)+2 instead.
This would account for Leap Years. Adding to the DAY() function would not.
Just something to keep in mind.

HTH,
Elkar

"PhillyD" wrote:

Cell A1 contains a date and is formatted as a date
Cell B1 should show the text NO COMPETENCY if A1 is blank, however, if A1 is
populated with a date, B1 should equal A1+(365*2)
Cell C1 should be blank if A1 is blank, however, if the date in B1 is less
than TODAY() display "EXPIRED", otherwise display "VALID".
I have tried to use IF and OR functions to do this but I obviously have the
syntax wrong is it merely returns VALUE#! for any option.
HELP!!!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Nested formula

Elkar,

Thank you very much - it works a treat!

"Elkar" wrote:

In cell B1 use this formula:

=IF(A1<"",DATE(YEAR(A1),MONTH(A1),DAY(A1)+(365*2) ),"No Competency")

In cell C1 use this formula:

=IF(A1<"",IF(TODAY()A1,"Expired","Valid"),"")

I'm not sure the significance of the (365*2) portion in the first formula,
but if you want to add 2 years, then you could just use YEAR(A1)+2 instead.
This would account for Leap Years. Adding to the DAY() function would not.
Just something to keep in mind.

HTH,
Elkar

"PhillyD" wrote:

Cell A1 contains a date and is formatted as a date
Cell B1 should show the text NO COMPETENCY if A1 is blank, however, if A1 is
populated with a date, B1 should equal A1+(365*2)
Cell C1 should be blank if A1 is blank, however, if the date in B1 is less
than TODAY() display "EXPIRED", otherwise display "VALID".
I have tried to use IF and OR functions to do this but I obviously have the
syntax wrong is it merely returns VALUE#! for any option.
HELP!!!!

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
Find value in array Brook6 Excel Worksheet Functions 26 January 30th 07 09:40 PM
Help with formula €“ too many nested IFs Bob Excel Worksheet Functions 7 September 18th 06 06:53 PM
Trouble with condition nested formula wilywayne New Users to Excel 2 August 31st 06 05:26 PM
Hyperlink in nested formula not linking KarenF Excel Discussion (Misc queries) 7 August 10th 06 10:43 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM


All times are GMT +1. The time now is 02:37 AM.

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

About Us

"It's about Microsoft Excel"