Complex filter, beyond Advanced Filter

  • In col A are a series of subsets. They vary in length and number. In col B is a set of values for each subset. The first value is at the bottom of each subset (first as in recorded first compared to value at top of each subset which was recorded last).


    I need a UDF or code that looks at col A, identifies the first value for each subset(...Rocky Danlew subset would be cell B8 '2.16') and pastes into col E.Then it compares that value with the second last value B7 '2.06' and pastes that into col E. If B7 is less than B8 then a "<" is defined for the rest of the operation. If B7 is more than B8 then a ">" is defined for the rest of the operation. In this first subset case, 2.06 is < 2.16 so only values "less than" last qualifying value will be posted to col E. In this case only 1.95 qualifies. In col F I've written down the logic argument for each row left in that subset.


    Col E displays the desired results. Cols C & D are not required and only used to demonstrate the methodology.
    Cheers