Hi Wade,
In a message dated 2010.06.18 18:29 -0500, Wade Smart wrote:
Im working on updating some forms and Im having trouble with one of the
cells.
=IF(AT238-AT196=0,"", AT238-AT196)
If this cell has a value of 0 then print nothing, else, print the value.
= IF(AU238>1, 1)
+ IF(AV238>1, 1)
+ IF(AW238>1, 1)
+ IF(AX238>1, 1)
+ IF(AY238>1, 1)
...
As Gene said, the first thing you need to do is change the argument
separators.
However, the next thing (I think) involves the second term: shouldn't
that be:
_+_ IF(AU238>1;1)
(like the other terms)?
Also, in the first term,
=IF(AT238-AT196=0;"";AT238-AT196)
is equivalent to
=IF(AT238-AT196;AT238-AT196;"")
and generally the latter form should be used because (a) it is more
compact and (b) the logic is positive rather than inverted (that is,
slightly easier to read).
However, you might consider the data type forcing that you are doing in
this expression: one case result is numeric (AT238-AT196), the other
text (""). Calc will handle it, but ambiguous typing can be risky
practice, and there may be times when it causes trouble. If you use type
forcing, you should be aware of it and have a functional reason for it.
In this case there appears to be no reason to force a text type in the
first term, because that term is just added to several other numeric
terms - forcing the type of the first term back to numeric. So the
expression can never have a text result, and thus - both in principle
and for performance reasons - you would be slightly better off with:
=IF(AT238-AT196=0;0;AT238-AT196) or =IF(AT238-AT196;AT238-AT196;0) .
[Again, I think the latter is preferable for the reasons given above.]
But then - the final simplification of that first term - isn't that just
this:
= AT238-AT196
?
IOW, isn't your cell expression
= AT238-AT196 + IF(AU238>1;1) + IF(AV238>1;1) + IF(AW238>1;1) + ...
?
Or did I misunderstand something?
John
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]