Date Formula with 2 conditions met needed

A

Amanda

I would appreciate any help you could give. I'm going to try to explain this.

In D2, I need to know if these two conditions - B2 is 5 years or more from
D1, and C2 is 62 years or more from D1 - are met. If so, I need to know what
date both of those conditions were met, otherwise leave blank.

Thanks
Amanda
 
R

RagDyer

If I understand what you're asking, try this in D2:

=IF(AND(DATE(YEAR(B2)+5,MONTH(B2),DAY(B2))<=D1,DATE(YEAR(C2)+62,MONTH(C2),DAY(C2))<=D1),"B2="&TEXT(B2,"m-d-y")&"
& C2="&TEXT(C2,"m-d-y"),"")
 
A

Amanda

It does make the qualifying conditions, however when they are met it is only
giving me the two dates from b2 and c2, rather than the earliest date that
both conditions are met. Is that even possible? For instance if b2 was 7
apr 1973 and c2 was 9 nov 1935, the first date that both conditions were met
is 9 nov 1997.
 
Y

YouBetcha

Try:

=IF(OR(DATE(YEAR(B2)+5,MONTH(B2),DAY(B2))>=D1,DATE(YEAR(C2)+62,MONTH(C2),DAY(C2))>=D1),MAX(DATE(YEAR(B2)+5,MONTH(B2),DAY(B2)),DATE(YEAR(C2)+62,MONTH(C2),DAY(C2))),"")
 
A

Amanda

Thank you all for your help! I was able to take the info below and the
beginning response to get what I needed. As always, everyone here is
wonderful!
 
D

David Biddulph

Glad it worked for you.

Sorry that the formatting of the quoted material went awry. I had sought
advice in an OE newsgroup on this occasional garbling of the line-feeds from
OE, and told that OE-QuoteFix should solve the problem, but apparently it
hasn't done so. :-(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top