I'm using the following function in a spreadsheet, and it works fine as
long as the number is a positive number. However, if the number is a
negative, I have to add a negative sign to the multiple criteria of the
MROUND function. Is there a work around that would make this function
show both positive or negative numbers?
=IF(ISERROR(MROUND(D2*0.5,0.01),quot; quot;,MROUND(D2*.05,0.01))
Changed =IF(ISERROR(MROUND(D2*0.5,-0.01),quot; quot;,MROUND(D2*.05,-0.01))Thanksone way:
=ROUND(D2*5,0)/100
In article .comgt;,
quot;smoorequot; gt; wrote:
gt; I'm using the following function in a spreadsheet, and it works fine as
gt; long as the number is a positive number. However, if the number is a
gt; negative, I have to add a negative sign to the multiple criteria of the
gt; MROUND function. Is there a work around that would make this function
gt; show both positive or negative numbers?
gt;
gt; =IF(ISERROR(MROUND(D2*0.5,0.01),quot; quot;,MROUND(D2*.05,0.01))
gt;
gt; Changed =IF(ISERROR(MROUND(D2*0.5,-0.01),quot; quot;,MROUND(D2*.05,-0.01))
gt;
gt;
gt; Thanks
Sorry, but I can't get this one to work for me.
When I posted my original question I mis-typed my function. This is a
corrected version.
=IF(ISERROR(MROUND(D2*0.5,0.01)),quot; quot;,MROUND(D2*0.5,0.01))
Now assuming that D2 is $6897.75, my function results in $3448.88 which
is correct, but only works if D2 is a positve number.
=ROUND(D2*5,0)/100 yields $344.89
I tried =ROUND(D2*5,0)/10 but this tields $3448.90Looks, like we've gotten there now. What I finaly found to work stems
from your last suggestion.
=IF(ISERROR(D2/2,2)),quot;quot;,ROUND(D2/2,2))
This leaves me a clean worksheet if there are no figures in D2 where
before if D2 was still empty I had #value errors. This works perfectly.
Thank you very much for your help.
Scotty
- May 16 Wed 2007 20:37
Force function to show positive or negative number?
close
全站熱搜
留言列表
發表留言