Forum Discussion
marty007
Mar 19, 2021Brass Contributor
Excel 2000 formulas
I'm trying to improve my Excel skills. Excel formulas: I can't understand why my logic is wrong. This what I'm trying to do. Formula to be placed in cell Y12. If the number in cell X12 is 8 or less, ...
- Mar 19, 2021OR returns true if one or more of it's arguments are true. Since you are testing for X12<=8 OR X12>8, at least one of those conditions will always be true (X12 will always be <=8 OR >8). So, your IF function will always return the true argument, which is 8.
IF(X12 is less than/equal to 8, then return X12, else return 8).
=IF(X12<=8, X12, 😎
Another option:
=MIN(X12, 😎
JMB17
Mar 19, 2021Bronze Contributor
OR returns true if one or more of it's arguments are true. Since you are testing for X12<=8 OR X12>8, at least one of those conditions will always be true (X12 will always be <=8 OR >8). So, your IF function will always return the true argument, which is 8.
IF(X12 is less than/equal to 8, then return X12, else return 8).
=IF(X12<=8, X12, 😎
Another option:
=MIN(X12, 😎
IF(X12 is less than/equal to 8, then return X12, else return 8).
=IF(X12<=8, X12, 😎
Another option:
=MIN(X12, 😎
- marty007Mar 19, 2021Brass Contributor
Thanks very much. Very helpful