close

don't know it this can work, but
i have working, long equations that break down into basically 3parts:
If switch is set, then a amp; b, else just a. That is a repetition I am trying
to get rid of.

basically have: =IF($ab$2=quot;xquot;,AND(A=C,B=C),A=C)

trying to get rid of using a=c twice, thanks..
(a can stand alone, but b must be anded with a)
maybe something like:
=AND(A=C,IF($ab$2=quot;xquot;,b=c)) but 2nd part comes up as false, so not work..
=AND(A=C,IF($ab$2lt;gt;quot;xquot;,quot;quot;,b=c)
=and(a=c,if($ab2=quot;xquot;,b=c,true)).quot;nastechquot; wrote:

gt; don't know it this can work, but
gt; i have working, long equations that break down into basically 3parts:
gt; If switch is set, then a amp; b, else just a. That is a repetition I am trying
gt; to get rid of.
gt;
gt; basically have: =IF($ab$2=quot;xquot;,AND(A=C,B=C),A=C)
gt;
gt; trying to get rid of using a=c twice, thanks..
gt; (a can stand alone, but b must be anded with a)
gt; maybe something like:
gt; =AND(A=C,IF($ab$2=quot;xquot;,b=c)) but 2nd part comes up as false, so not work..
gt; =AND(A=C,IF($ab$2lt;gt;quot;xquot;,quot;quot;,b=c)
gt;
gt;

gt; trying to get rid of using a=c twice

I think if you factor out a=c, it reduces to this:

=AND(a=c,OR(b=c, $ab$2lt;gt;quot;xquot;) )

Hope I got it right :gt;)
--
HTH. :gt;)
Dana DeLouis
Windows XP, Office 2003quot;nastechquot; gt; wrote in message
...
gt; don't know it this can work, but
gt; i have working, long equations that break down into basically 3parts:
gt; If switch is set, then a amp; b, else just a. That is a repetition I am
gt; trying
gt; to get rid of.
gt;
gt; basically have: =IF($ab$2=quot;xquot;,AND(A=C,B=C),A=C)
gt;
gt; trying to get rid of using a=c twice, thanks..
gt; (a can stand alone, but b must be anded with a)
gt; maybe something like:
gt; =AND(A=C,IF($ab$2=quot;xquot;,b=c)) but 2nd part comes up as false, so not work..
gt; =AND(A=C,IF($ab$2lt;gt;quot;xquot;,quot;quot;,b=c)
gt;
gt;
quot;nastechquot; wrote:
gt; i have working, long equations [...].
gt; basically have: =IF($ab$2=quot;xquot;,AND(A=C,B=C),A=C)
gt; trying to get rid of using a=c twice

You do not explain why. If you merely want to avoid typing,
any of the methods suggested so far will suffice. But you
might also want consider the cost of evaluating formulas
unnecessarily, if they are quot;long equationsquot; or invoke costly
functions. To minimize that, I believe you want to stick with
the IF() form, but change the order of testing.

=if(A=C, or(B=C, $ab$2lt;gt;quot;xquot;), false)

When A=C is false, that avoids evaluating B=C while also
reducing typing. Even more efficient:

=if(A=C, if($ab$2lt;gt;quot;xquot;, true, B=C), false)

The point is: AND() and OR() functions evaluate all
parameters, whereas IF() evaluates only the appropriate
true-part or false-part depending on the value of the
conditional expression. Arguably, usually it is not a big deal.

Thanks-all ! ! These answers all look good, and should all be right, as was
wondering about use of true/false in equations, and have not tried any of
them yet. (particular version my application the only choice left)

sorry if I left anything out I could have included, thought of the
following, but it may not matter? long-legs includes tests of same item from
mulitple locations, placed in a conditional format (for which this question
surrounds). For items that I quot;havequot; to test, the space required of 257/258
characters was a constraint. Thanks.
quot;bpeltzerquot; wrote:

gt; =and(a=c,if($ab2=quot;xquot;,b=c,true)).
gt;
gt;
gt; quot;nastechquot; wrote:
gt;
gt; gt; don't know it this can work, but
gt; gt; i have working, long equations that break down into basically 3parts:
gt; gt; If switch is set, then a amp; b, else just a. That is a repetition I am trying
gt; gt; to get rid of.
gt; gt;
gt; gt; basically have: =IF($ab$2=quot;xquot;,AND(A=C,B=C),A=C)
gt; gt;
gt; gt; trying to get rid of using a=c twice, thanks..
gt; gt; (a can stand alone, but b must be anded with a)
gt; gt; maybe something like:
gt; gt; =AND(A=C,IF($ab$2=quot;xquot;,b=c)) but 2nd part comes up as false, so not work..
gt; gt; =AND(A=C,IF($ab$2lt;gt;quot;xquot;,quot;quot;,b=c)
gt; gt;
gt; gt;

060129: smaller equations: a amp; b, or just a..
Thanks-all ! ! These answers all look good, and should all be right, as was
wondering about use of true/false in equations, and have not tried any of
them yet. (particular version my application the only choice left)

sorry if I left anything out I could have included, thought of the
following, but it may not matter? long-legs includes tests of same item from
mulitple locations, placed in a conditional format (for which this question
surrounds). For items that I quot;havequot; to test, the space required of 257/258
characters was a constraint. Thanks.quot;Dana DeLouisquot; wrote:

gt; gt; trying to get rid of using a=c twice
gt;
gt; I think if you factor out a=c, it reduces to this:
gt;
gt; =AND(a=c,OR(b=c, $ab$2lt;gt;quot;xquot;) )
gt;
gt; Hope I got it right :gt;)
gt; --
gt; HTH. :gt;)
gt; Dana DeLouis
gt; Windows XP, Office 2003
gt;
gt;
gt; quot;nastechquot; gt; wrote in message
gt; ...
gt; gt; don't know it this can work, but
gt; gt; i have working, long equations that break down into basically 3parts:
gt; gt; If switch is set, then a amp; b, else just a. That is a repetition I am
gt; gt; trying
gt; gt; to get rid of.
gt; gt;
gt; gt; basically have: =IF($ab$2=quot;xquot;,AND(A=C,B=C),A=C)
gt; gt;
gt; gt; trying to get rid of using a=c twice, thanks..
gt; gt; (a can stand alone, but b must be anded with a)
gt; gt; maybe something like:
gt; gt; =AND(A=C,IF($ab$2=quot;xquot;,b=c)) but 2nd part comes up as false, so not work..
gt; gt; =AND(A=C,IF($ab$2lt;gt;quot;xquot;,quot;quot;,b=c)
gt; gt;
gt; gt;
gt;
gt;
gt;

060129: smaller equations: a amp; b, or just a..
Thanks-all ! ! These answers all look good, and should all be right, as was
wondering about use of true/false in equations, and have not tried any of
them yet. (particular version my application the only choice left)

sorry if I left anything out I could have included, thought of the
following, but it may not matter? long-legs includes tests of same item from
mulitple locations, placed in a conditional format (for which this question
surrounds). For items that I quot;havequot; to test, the space required of 257/258
characters was a constraint. Thanks.quot; wrote:

gt; quot;nastechquot; wrote:
gt; gt; i have working, long equations [...].
gt; gt; basically have: =IF($ab$2=quot;xquot;,AND(A=C,B=C),A=C)
gt; gt; trying to get rid of using a=c twice
gt;
gt; You do not explain why. If you merely want to avoid typing,
gt; any of the methods suggested so far will suffice. But you
gt; might also want consider the cost of evaluating formulas
gt; unnecessarily, if they are quot;long equationsquot; or invoke costly
gt; functions. To minimize that, I believe you want to stick with
gt; the IF() form, but change the order of testing.
gt;
gt; =if(A=C, or(B=C, $ab$2lt;gt;quot;xquot;), false)
gt;
gt; When A=C is false, that avoids evaluating B=C while also
gt; reducing typing. Even more efficient:
gt;
gt; =if(A=C, if($ab$2lt;gt;quot;xquot;, true, B=C), false)
gt;
gt; The point is: AND() and OR() functions evaluate all
gt; parameters, whereas IF() evaluates only the appropriate
gt; true-part or false-part depending on the value of the
gt; conditional expression. Arguably, usually it is not a big deal.

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()