IF, AND, OR Formula Help

D

Diane1477

I am not sure how to create the following statement properly:

I have Dates in column R and comments in Column S. I want to create a
formula that returns an X in column A if either of the following conditions
are true:
1. If the date in column R is over 2 years from today's date, or
2. If there are notes in column S

I am using the formula :
=IF(OR(R2<TODAY()-730,S2<>""),"X","")
But the above formula is returning an X in column A if column R is blank.
In cases where column R is blank, column A should blank rather than returning
an X.

Any ideas how to get this to work correctly??? Please help...
 
B

Bob Phillips

=IF(OR(R2>DATE(YEAR(TODAY())+2,MONTH(TODAY()),DAY(TODAY())),S2<>""),"X","")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

joeu2004

I want to create a formula that returns an X in column A
if either of the following conditions are true:
1. If the date in column R is over 2 years from today's date, or
2. If there are notes in column S

I am using the formula :
=IF(OR(R2<TODAY()-730,S2<>""),"X","")
But the above formula is returning an X in column A if column R is blank.  
In cases where column R is blank, column A should blank rather than
returning an X.

=if(R2="", "", if(or(R2<today()-730, S2<>""), "X", ""))

Or:

=if(or(and(R2<>"", R2<today()-730), S2<>""), "X", "")
 
D

Diane1477

I thought the formulas suggested worked, but in rows where column R fits the
criteria for an X but Column S is blank, an X is not displaying in Column A.
Any other ideas??
 
C

CLR

If you set up a test worksheet with ALL of the suggested formulas you will
see differeing degrees of "working" when varying the conditions.........I
believe my suggestion does as you wish with the added benefit of not giving
an "X" if there is only a NUMBER in column S rather than a TEXT comment, in
case that may be of value...........

Vaya con Dios,
Chuck, CABGx3
 
B

Bob Phillips

I have just checked that and mine and Ryan's both work in that circumstance.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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