Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default How do I use the "if" and "round" function in the same formula ?

I have a formula that reads =IF(I135-J135=0,"OK","ERROR")

I can see that the figures in cells I135 & J135 are identical so I should
get a return of "OK" but I get "ERROR" 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jerry W. Lewis
 
Posts: n/a
Default How do I use the "if" and "round" function in the same formula ?

If I135 and J135 were really identical you would not be getting "ERROR"
=(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)<0.001,"OK","ERROR")
Replace 0.001 with a suitably small number for your context.

Jerry

"carl" wrote:

I have a formula that reads =IF(I135-J135=0,"OK","ERROR")

I can see that the figures in cells I135 & J135 are identical so I should
get a return of "OK" but I get "ERROR" 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default How do I use the "if" and "round" function in the same formula

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
:-)

"Jerry W. Lewis" wrote:

If I135 and J135 were really identical you would not be getting "ERROR"
=(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)<0.001,"OK","ERROR")
Replace 0.001 with a suitably small number for your context.

Jerry

"carl" wrote:

I have a formula that reads =IF(I135-J135=0,"OK","ERROR")

I can see that the figures in cells I135 & J135 are identical so I should
get a return of "OK" but I get "ERROR" 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

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



All times are GMT +1. The time now is 07:25 PM.

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"