Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 & b, else just a. That is a repetition I am trying to get rid of. basically have: =IF($ab$2="x",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="x",b=c)) but 2nd part comes up as false, so not work.. =AND(A=C,IF($ab$2<"x","",b=c) |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=and(a=c,if($ab2="x",b=c,true)).
"nastech" wrote: 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 & b, else just a. That is a repetition I am trying to get rid of. basically have: =IF($ab$2="x",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="x",b=c)) but 2nd part comes up as false, so not work.. =AND(A=C,IF($ab$2<"x","",b=c) |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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$2<"x") ) Hope I got it right :) -- HTH. :) Dana DeLouis Windows XP, Office 2003 "nastech" wrote in message ... 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 & b, else just a. That is a repetition I am trying to get rid of. basically have: =IF($ab$2="x",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="x",b=c)) but 2nd part comes up as false, so not work.. =AND(A=C,IF($ab$2<"x","",b=c) |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"nastech" wrote:
i have working, long equations [...]. basically have: =IF($ab$2="x",AND(A=C,B=C),A=C) 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 "long equations" 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$2<"x"), false) When A=C is false, that avoids evaluating B=C while also reducing typing. Even more efficient: =if(A=C, if($ab$2<"x", 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. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 "have" to test, the space required of 257/258 characters was a constraint. Thanks. "bpeltzer" wrote: =and(a=c,if($ab2="x",b=c,true)). "nastech" wrote: 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 & b, else just a. That is a repetition I am trying to get rid of. basically have: =IF($ab$2="x",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="x",b=c)) but 2nd part comes up as false, so not work.. =AND(A=C,IF($ab$2<"x","",b=c) |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
060129: smaller equations: a & 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 "have" to test, the space required of 257/258 characters was a constraint. Thanks. "Dana DeLouis" wrote: 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$2<"x") ) Hope I got it right :) -- HTH. :) Dana DeLouis Windows XP, Office 2003 "nastech" wrote in message ... 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 & b, else just a. That is a repetition I am trying to get rid of. basically have: =IF($ab$2="x",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="x",b=c)) but 2nd part comes up as false, so not work.. =AND(A=C,IF($ab$2<"x","",b=c) |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
060129: smaller equations: a & 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 "have" to test, the space required of 257/258 characters was a constraint. Thanks. " wrote: "nastech" wrote: i have working, long equations [...]. basically have: =IF($ab$2="x",AND(A=C,B=C),A=C) 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 "long equations" 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$2<"x"), false) When A=C is false, that avoids evaluating B=C while also reducing typing. Even more efficient: =if(A=C, if($ab$2<"x", 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to transfer equations from Excel 1997 to Excel 2003 | Excel Discussion (Misc queries) | |||
Solving sets of equations | Excel Worksheet Functions | |||
IF function with value_if_true and value_if_false as equations | Excel Worksheet Functions | |||
divide a large group of people into smaller groups by their vote | Excel Discussion (Misc queries) | |||
Working with array equations | Excel Discussion (Misc queries) |