Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default smaller equations: a & b, or just a..

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   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default smaller equations: a & b, or just a..

=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   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default smaller equations: a & b, or just a..

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   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default smaller equations: a & b, or just a..

"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   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default 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.



"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   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default smaller equations: a & b, or just a..

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   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default smaller equations: a & b, or just a..

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to transfer equations from Excel 1997 to Excel 2003 JP Excel Discussion (Misc queries) 2 January 17th 06 09:11 PM
Solving sets of equations Siberian Excel Worksheet Functions 2 January 11th 06 06:08 AM
IF function with value_if_true and value_if_false as equations emrobertson Excel Worksheet Functions 4 November 29th 05 09:15 PM
divide a large group of people into smaller groups by their vote siku Excel Discussion (Misc queries) 1 August 26th 05 05:42 PM
Working with array equations OkieViking Excel Discussion (Misc queries) 2 January 23rd 05 07:43 AM


All times are GMT +1. The time now is 04:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"