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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
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,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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