close

I have a formula that reads =IF(I135-J135=0,quot;OKquot;,quot;ERRORquot;)

I can see that the figures in cells I135 amp; J135 are identical so I should
get a return of quot;OKquot; but I get quot;ERRORquot; instead. Could be something to do
with rounding ? if so how do I amend the formula to cope with this. (Note, I
have the same formula on two other worksheets in the same workbook, and they
both work fine !)

any suggestions, greatly appreciated

If I135 and J135 were really identical you would not be getting quot;ERRORquot;
=(I135-J135)
will show you the difference that Excel is keying on.

How close do they need to be? Try something like
=IF(ABS(I135-J135)lt;0.001,quot;OKquot;,quot;ERRORquot;)
Replace 0.001 with a suitably small number for your context.

Jerry

quot;carlquot; wrote:

gt; I have a formula that reads =IF(I135-J135=0,quot;OKquot;,quot;ERRORquot;)
gt;
gt; I can see that the figures in cells I135 amp; J135 are identical so I should
gt; get a return of quot;OKquot; but I get quot;ERRORquot; instead. Could be something to do
gt; with rounding ? if so how do I amend the formula to cope with this. (Note, I
gt; have the same formula on two other worksheets in the same workbook, and they
gt; both work fine !)
gt;
gt; any suggestions, greatly appreciated

Jerry, thank you very much for your quick response, and your suggestion
worked. I guess I was getting hung up on using the round function and never
thought of using absolute number instead

Thanks again
Carl
:-)

quot;Jerry W. Lewisquot; wrote:

gt; If I135 and J135 were really identical you would not be getting quot;ERRORquot;
gt; =(I135-J135)
gt; will show you the difference that Excel is keying on.
gt;
gt; How close do they need to be? Try something like
gt; =IF(ABS(I135-J135)lt;0.001,quot;OKquot;,quot;ERRORquot;)
gt; Replace 0.001 with a suitably small number for your context.
gt;
gt; Jerry
gt;
gt; quot;carlquot; wrote:
gt;
gt; gt; I have a formula that reads =IF(I135-J135=0,quot;OKquot;,quot;ERRORquot;)
gt; gt;
gt; gt; I can see that the figures in cells I135 amp; J135 are identical so I should
gt; gt; get a return of quot;OKquot; but I get quot;ERRORquot; instead. Could be something to do
gt; gt; with rounding ? if so how do I amend the formula to cope with this. (Note, I
gt; gt; have the same formula on two other worksheets in the same workbook, and they
gt; gt; both work fine !)
gt; gt;
gt; gt; any suggestions, greatly appreciated

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()