Forum Discussion
Abdullah_Khalid
Dec 22, 2018Copper Contributor
round to the nearest number
HELLO ,
I want to round the number in cell D6 to the nearest number in raw (2) in the table (I:T,2:12).
could you help me please,
thank you.
- Detlef_LewinSilver Contributor
Hi
Classic INDEX() with double MATCH().
=INDEX($J$4:$T$13,MATCH(E4,$I$4:$I$13,1),MATCH(D4,$J$2:$T$2,1))
- Abdullah_KhalidCopper Contributorit round to ( .15 ) which isn't in raw (2) in the table (I:T,2:12).
- Abdullah_KhalidCopper Contributorthe answer should be 2 not .15
That could be
=INDEX($J$2:$T$2,0,MATCH(MIN(INDEX(ABS($J$2:$T$2-D6),0)),INDEX(ABS($J$2:$T$2-D6),0),0))
if don't take into account possible float point calculation error.