Forum Discussion
SimonMS
Nov 24, 2025Occasional Reader
Excel bug Data sorting largest to smallest
I have some problems by sorting data in excel. First sorting by column M Largest to Smallest, than by column L also Largest to Smallest. In one case sorting is not successfully (Marked font color R...
Riny_van_Eekelen
Nov 25, 2025Platinum Contributor
Odd indeed, but it's due to some minute rounding difference. The first 593.1 is considered greater than the second one. Normally you would see that in the 15th decimal but in your file that's not the case either. Both numbers are equal to the eye, though internally they are not. Google for "floating-point arithmetic" to read more about it.
When you notice something like that, wrap your formulas in column M in the ROUND function and the problem will go away. In M5 enter:
=ROUND(SUM(G5:L5),1)and copy down. Re-apply the custom sort.