![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 07:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com