Hello,
I am looking for a formula which finds the previous cell which matches C(n), e.g. C12, if I search UP both columns of the array C2:D(n-1), e.g. C2:D11.
If the first match found is in column C, I would like the formula to return the corresponding value in column M. In the example, C2 is the previous match for C12, so the formula should return M2 (1.26).
But if the first match is in column D, I would like it to return the corresponding value from column P.
I’ve tried reading the instructions for the index, match, and lookup functions but none of them have helped me get any closer to what I am trying to do I’m afraid. I’d really appreciate the help.
Example.ods (27.5 KB)