rounding a number to a set of other numbers

Copper Contributor

Untitled.png

Hello,

I need to know how to make a formula that will round a number to a set of other number

ex. in the pic 2.7 should be rounded to 5 , and 16 to13 and 4 to 5 or 3 

how to make this formula

thank you

1 Reply

Hi Abdullah,

 

I didn't catch the logic. If you'd like to find the closest from column C number to one from column B that could be

=INDEX($C$5:$C$10,MATCH(MIN(INDEX(ABS($C$5:$C$10-B5),0)),INDEX(ABS($C$5:$C$10-B5),0),0),0)

But closest to 2.7 is 1, not 5. And why 4 is to be rounded to 5 or 3, from here 3 is appeared?