The parameters are:
- The column may contain either negative or positive numbers (including the decimals forms of proper fractions), blank cells, text or errors (like
#DIV/0!
), and will have data added to it over time. - It uses
LOOKUP
in its vector form.
The formula (with Column A as the column in question) is:
=LOOKUP(1,-1/A:A^2,A:A)
The thinking is
- First make sure any negative numbers are positive by squaring them using
A:A^2
- Make all the numbers negative by using
-1/<resulting number from 1.>
. - Then, when
LOOKUP
goes looking for the value 1, it will exploit the behaviour ofLOOKUP
to return the last number in column for a value that it can't find that is greater than any of the numbers in the resulting array.
I think it works in all circumstances, but can anyone see something that breaks it?
Thanks in advance.