How do I add iserr or iserror to this
Neall,
The equation as shown in your 5/29/09 2:40PM posting has errors and
can't be entered as shown.
I tested the equation that I posted and would appear to cover all of
your conditions. I assigned the name "Disc" to a cell formatted as
percentage. M36 and Q36 tested as either General or Currency formats
with same results.
formula in Q36: =IF(ISNUMBER(M36),M36-(M36*Disc),"")
Tested on Excel Office X, and 2004
Some examples:
M36: Disc: Result in Q36
100 0% 100
100 5% 95
blank 0% blank
100 blank blank
blank blank blank
Is this what you intended ?
Art
On 5/29/09 2:40 PM, Neall wrote:
Thanks but that doesn't work, here is the syntax I thought would work, I use
it on my other formula's to get rid of "#Value" in my cells when the cell
should be blank
=IF(ISERR((M29-(M29*Disc),M29-(M29*Disc),M29)),"",(M29-(M29*Disc),M29-(M29*Disc),M29))
Again basically if there is no discount to be given the cell should just be
populated with what is in M29, if there is a discount to be given (Disc would
have a percentage) then is will do the math to show the discounted amount in
the cell. Again this all works great but when there is no part number to
price against or give a discount against I get the #Value error in the field
because the answer is 0, which messes up price sum value.
Any suggestions how I can get this to work so the cell is empty when there
is no pricing involved?
Thanks
"Art" wrote:
On 5/29/09 8:57 AM, Neall wrote:
I guess I should explain, I have a set of cells that show full
price M29 -
M36 then I have another set of cells that show price either A)
as full price
(pulling from M29 - M36) or the discounted price Q29 - Q36.
So basically if there is no discount the full price of the parts
get shown
in Q29 - Q36 if there are discounts to be had then Q29-36 show
the discounted
amount for each part
So in Q29 - Q36 I have this
=IF(M36-(M36*Disc),M36-(M36*Disc),M36)
Which is saying if there is no discount then take the numbers
from M and
display them in Q, if there is a discounted noted show the
discounted price
and not the values in M
This works now I just need to get ride of the #Value! in those
cells when
there is no part to price against, because its effecting the sum
Thanks in advance
Neall,
The first argument (logical_test) in an IF statement needs to evaluate
to a boolean result. In your formula above, the evaluation of
"M36-(M36*Disc)" is likely numeric which will lead to unpredictable
results.
You might try something even simpler like this:
=IF(ISNUMBER(M36),M36-(M36*Disc),"")
--
Regards,
Art
|