Match first instance of cell in a column not equal to the other column with offset

Viewed 73

Suppose I have the following table

    +---+-------+-------+
    |   |   A   |   B   |
    +---+-------+-------+
    | 1 |  7,75 |  9,50 |
    +---+-------+-------+
    | 2 |  9,50 | 10,50 |
    +---+-------+-------+
    | 3 | 10,50 | 11,50 |
    +---+-------+-------+
    | 4 | 11,75 | 13,00 |
    +---+-------+-------+
    | 5 | 13,00 | 14,00 |
    +---+-------+-------+
    | 6 | 14,00 | 15,25 |
    +---+-------+-------+
    | 7 | 15,25 |       |
    +---+-------+-------+

I want to find the first occurrence in column A where it does not match column B with an offset of -1 in the rows (in this case, it should give me 11.75, A4)

I would like to avoid using VBA.

I tried using MATCH, but I'm unsure how to do the condition with 2 tables

2 Answers

Would this work for you:

=LOOKUP(1,1/(A2:A7<>B1:B6),A2:A7)

No need to CSE LOOKUP().

use INDEX/AGGREGATE:

=INDEX(A:A,AGGREGATE(15,7,ROW(A2:A7)/(A2:A7<>B1:B6),1))

enter image description here

Related