Identical text strings return false when compared.

Msgjazz

New Member
Joined
Oct 21, 2003
Messages
45
So I have a issue where the comparisons of two cell are the same but I get a FALSE statement instead of a TRUE statement. In the first cell it's a sum of a range. The second cell is a sumif results. I did a TRIM on both cells and one count is 9 and the other is 16. But I have other similar items and they are all the same. They all return TRUE except one that returns FALSE.
Screenshot 2023-09-18 171657.png

The Formula for Team 14, in cell J182 is "=SUM(J160:J168)". The formula in N182 is "=SUMIF($A:$A,14,$D:$D)". The same is true for all the other cell except that they correspond to the individual teams. For Team 4, where the error is, the formula is "=SUM(J47:J61)" in cell J174, and "=SUMIF($A:$A,4,$D:$D)" in cell N174. But Team 14 is TRUE, but Team 4 is FALSE. And as you can see in Columns Q and R, the ones returning FALSE has a longer decimal value, even though the format was set the same in Columns J and N.
confused.gif


Any help would be greatly appreciated. TIA
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I would wager it has to do with a known floating point error in Excel. You may need to round the results manually. For reference: Floating Point Errors in Excel

Also, your title is misleading as you are not comparing text strings, but rather numerical values.
 
Upvote 0
Use round(), roundup(), or rounddown(), then compare or compare with an epsilon, i.e., =IF(ABS(J164-N164)<0.01,TRUE,FALSE)
 
Upvote 0
Solution
Use round(), roundup(), or rounddown(), then compare or compare with an epsilon, i.e., =IF(ABS(J164-N164)<0.01,TRUE,FALSE)
I think you mean ABSOLUTE, not EPSILON!
;)
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

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