I have some hard-coded values in the B column: $B$2:$B$86. Next to it, I have some computed values in the range $C$2:$C$86. What I want to do is this: for each computed value in the C column, I want to find the element in the B column that is closest to it, and return that. I want something like this (which doesn’t work, but communicates the idea) in the D column: =LOOKUP(MIN(ABS($B$2:$B$86-C2)),ABS($B$2:$B$86-C2),$B$2:$B$86).
The problem is that the ABS function does not appear to take arrays (or a range of values) for arguments. For that matter, I’m not sure LibreOffice is able to subtract a scalar from a vector (here, I just mean that I want to subtract the vector consisting of all entries equal to the value in C2, and of the same dimensions as the B column). I’ve fiddled around with curly braces and array functions, but was not able to get it to work.
Any ideas?