Choosing the closest value from database



Hello!

I'm trying to solve a what seems a simple problem here, but can't see how.

I have a formula that computes the value of a resistance. Obviously, it's a fractional number.
I need to choose the closest value from something like the E24 series of numbers 
(https://en.wikipedia.org/wiki/E24_series).
I have put the series on a separate page and... now I'm stuck.
I found the functions MATCH(), and LOOKUP(), but they won't find the closest value.
Besides, MATCH(x,y,-1) doesn't seem to work altogether, it always returns the number of elements in the match 
array.
The closest thing I came with is the following formula:

match(min((A2:A98-H8)^2);(A2:A98-H8)^2;0)

(must be entered as array formula to work).
Now I have the row index inside my array, but how to I get the respective element of the array?
Maybe there's an easier way?

-- 
С уважением,
Андрей


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]