INT Function not working

ssalazarjr

Board Regular
Joined
Jun 1, 2009
Messages
158
I'm getting a FALSE when entering this formula.

A2=$789.14
B2=$ 3.14

=(A2-INT(A2))=(B2-INT(B2))

When I evaluate the formula I get notice:

=(.1399999999986)=(B2-INT(B2))

=(.1399999999986)=(.14)

I've know its not a decimal place issue, because I'm entering the amounts myself. I put exactly 789.14.

I also tried =MOD(A2,1)=MOD(B2,1) and it does the same thing.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
It has to do with the floating point decimal system that Excel uses. A way around it is to use the ROUND function as well... try:

=ROUND((A2-INT(A2)),2)=ROUND((B2-INT(B2)),2)
 
Upvote 0
Hey thanks for your reply.

I googled the "floating point decimal system" (thanks to your reply) and found their is a way to deactivate it.

  1. Click Microsoft Office Button -> Excel Options -> Advanced
  2. Scroll down to "When calculating this workbook" section
  3. Check "Set precision as displayed"
Do see any problems with doing it that way?
 
Upvote 0
If you have any calculations that need to be more accurate, then unticking that option can cause things to go awry.
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,847
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top