This still won't work
It won't be sufficient to look at the rounded result of the MOD function
If A1=32.9 and A2=37.8 then ROUND(MOD(A1,1),1)=0.9 and ROUND(MOD(A2,1),1)=0.8 - the first is greater so C1 should show 33.
But If A1=32.2 and A2=37.1 then ROUND(MOD(A1,1),1)=0.2 and ROUND(MOD(A2,1),1)=0.1 - the first is greater again but this time is further from an integer.
You need to use ABS, i.e.
ABS(A1-ROUND(A1,0))
or something similar.
Hello pinmaster
Of course A1 is returned if both values are equidistant from an integer, my assumption is that one or other value needs to be returned so in the absence of any other advice I choose A1, of course you could always adjust the formula to return A2 rounded if both are the same distance from an integer, or return the greatest or smallest.....
Bookmarks