If statement conversion from Lotus to Excel2007

C

C-town

I have never included 'OR' in an if statement.
How will the following statements need to be written excel to get it them
work?

@IF($A$5-I10<30#OR#I10="ACTIVE",D10-AG10,D10-E10)

@IF(I10=0#OR#I10>=$A$5," NO"," YES")
 
D

Dave Peterson

=if(or($a$5-i10<30,i10="active"),d10-ag10,d10-e10)

=if(or(i10=0,i10>=$a$5),"NO","YES")

I wouldn't include those leading spaces in the strings. I'd either format the
cell to center the value--or indent (format|cells|alignment tab).

I hate when I write:
=if(a99="no","nope","not nope")
and I can see "NO" in a99, but my formula won't work.

And I wouldn't want to write:
=if(trim(a99)="no",....
for every possible formula.
 
T

T. Valko

@IF($A$5-I10<30#OR#I10="ACTIVE",D10-AG10,D10-E10)

=IF(OR($A$5-I10<30,I10="ACTIVE"),D10-AG10,D10-E10)
@IF(I10=0#OR#I10>=$A$5," NO"," YES")

=IF(OR(I10=0,I10>=$A$5)," NO"," YES")

I assume you intentionally want those leading spaces in there.
 
L

Luke M

OR & AND follow similar structure of:
AND(arg1, arg2, arg3, etc)
and returns a single boolean result.

Your formulas:
=IF(OR($A$5-I10<30,I10="ACTIVE"),D10-AG10,D10-E10)

=IF(OR(I10=0,I10>$A$5),"NO","YES")
 
C

C-town

It works when I9 is a value but it DOES NOT work when I9=ACTIVE.
Any other suggestions?
 
C

C-town

The formula works if I have a date value in I but it DOES NOT work if
I=ACTIVE. Any other suggestions???
 
T

T. Valko

=IF(OR($A$5-I10<30,I10="ACTIVE"),D10-AG10,D10-E10)
The formula works if I have a date value in I but it
DOES NOT work if I=ACTIVE.

Ooops!

I should have noticed this the first time around. Try it like this:

=IF(OR($A$5-N(I10)<30,I10="ACTIVE"),D10-AG10,D10-E10)

OK, with the other formula:

=IF(OR(I10=0,I10>=$A$5)," NO"," YES")

What result do want if/when I10 = Active? If I10 = Active and A5 is a number
(or date, time) you're testing:

Active>=some number

This will evaluate as TRUE and the formula will return NO.
 

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