EXACT formula returns FALSE for identical numbers

SashSegal

New Member
Joined
Feb 21, 2009
Messages
1
I recently had to compare numbers in two columns in two different worksheets (located in the same Excel file). I used the EXACT function to determine whether the numbers were the same or not.

There were a number of instances where the EXCAT formula returned a FALSE even if the numbers were identical. I set the cells to a general format, so that all the decimals would be displayed and the numbers were ablsolutely identical, to the last decimal.

Does anyone have an explanation to why this happens?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Welcome to the Forum SashSegal,

The first thing jumps to my mind would be to test the length of both of those cells. =Len(A1). See if they return the same number.
 
Upvote 0
Hi

You can't perform this kind of comparison using floating point numbers without rounding the values first due to the limited precision within Excel and the way computers store values in Binary. Hence you should round both numbers first:

=ROUND(A1,4)=ROUND(B1,4)

Using EXACT is unnecessary - you should only use EXACT for string comparisons where case sensitivity is important.
 
Upvote 0

Forum statistics

Threads
1,226,431
Messages
6,191,026
Members
453,632
Latest member
pfrink5

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