ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If statement conversion from Lotus to Excel2007 (https://www.excelbanter.com/excel-worksheet-functions/254139-if-statement-conversion-lotus-excel2007.html)

C-town

If statement conversion from Lotus to Excel2007
 
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")

Dave Peterson

If statement conversion from Lotus to Excel2007
 
=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.

C-town wrote:

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")


--

Dave Peterson

T. Valko

If statement conversion from Lotus to Excel2007
 
@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.

--
Biff
Microsoft Excel MVP


"C-town" wrote in message
...
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")




Luke M

If statement conversion from Lotus to Excel2007
 
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")
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"C-town" wrote:

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")


C-town[_2_]

If statement conversion from Lotus to Excel2007
 
It works when I9 is a value but it DOES NOT work when I9=ACTIVE.
Any other suggestions?
"Luke M" wrote:

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")
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"C-town" wrote:

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")


C-town[_2_]

If statement conversion from Lotus to Excel2007
 
The formula works if I have a date value in I but it DOES NOT work if
I=ACTIVE. Any other suggestions???



"T. Valko" wrote:

@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.

--
Biff
Microsoft Excel MVP


"C-town" wrote in message
...
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")



.


T. Valko

If statement conversion from Lotus to Excel2007
 
=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.

--
Biff
Microsoft Excel MVP


"C-town" wrote in message
...
The formula works if I have a date value in I but it DOES NOT work if
I=ACTIVE. Any other suggestions???



"T. Valko" wrote:

@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.

--
Biff
Microsoft Excel MVP


"C-town" wrote in message
...
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")



.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com