Lookup next largest with multiple equal values

  • Hi, I am trying to work out how to use a formula or VBA code to lookup the next largest value in an array. The array is sorted smallest to largest, but it has multiple values that are the same, which I want to skip over and report on the next largest. For instance, the values might be;


    5
    5
    6
    6
    6
    7
    7
    7
    7


    If the current value is 6 and I want to find the next largest, which would be 7. I have tried a few variations of the Index and Match functions, but to no avail. If someone could help that would be awesome.

  • Try:


    =INDEX(A2:A10,MATCH(TRUE,INDEX(A2:A10>C2,0),0))


    where C2 contains lookup value and A2:A10 contains range to look up.

    Where there is a will there are many ways. Finding one that works for you is the challenge!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!