ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculation within IF function (https://www.excelbanter.com/excel-worksheet-functions/9083-calculation-within-if-function.html)

Andrew

Calculation within IF function
 
I searched b-boards for previous comments, but I didn't see any.

The calculator on my desk says that 5625*0.07 = 393.75.

=IF(5625*0.07-393.75=0,"WIN",5625*0.07-393.75)

Why does Excel think the subtraction in the above agrument is not zero, but
some infinitesimally small number? If typed into Excel, this will not
display WIN.

Any comments?

cmart02

Wrap the calculatioin with the function ROUND in order to get the precision
you need:

ROUND(5625*0.07-393.75,0)=0

If you type =5625*0.07-393.75=0 in a cell Excel returns FALSE, thus, causing
the problem you're encoutering.

Regards,
Robert

Andrew

Thanks for the prompt response.

"cmart02" wrote:

Wrap the calculatioin with the function ROUND in order to get the precision
you need:

ROUND(5625*0.07-393.75,0)=0

If you type =5625*0.07-393.75=0 in a cell Excel returns FALSE, thus, causing
the problem you're encoutering.

Regards,
Robert



All times are GMT +1. The time now is 03:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com