dimanche 29 mars 2015

Find the cell which returns lowest difference from a range in excel?

I have a set of range of values in a column: Column1 1.1

2.5 3.66 4.23


Value to test difference from 20 Value returned 23


Now I want a code that could return the cell value which has the minimum absolute difference from a given number in another cell(say if it contains 20, it should return 23 as 20-1=19,20-5=15,66-20=26 and 23-20=3).


Aucun commentaire:

Enregistrer un commentaire