I have an array of 10000 generated values and I would like to search the array like the Excel match function. I have looked at the following post and tried to implement it without success, I get strange values back:
The one thing that stands out is that you said in the first post you want the closest value, whereas floor() returns the closest below. Could that be the problem with the results you're expecting? If it is, you might need to use ceiling() as well, and see which is closer.