Posts by URIE

    I have some error handling code below. As soon as you seem to try and put anything in the error handling section, other than an error message, it seems to jump out of the error handler and exit the sub as though the sheets code is in error itself.


    I am trying to capture the error so I can manually iterate one aspect of the formula because if there is an error it should go to the next. Without the error handling excel jumps out of the code and an incorrect solution is found with no warning.


    Any suggestions appreciated!


    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.