How can I find the highest price among the prices with same contiguous label ?
For instance, in the picture below the result of the formula in D6 should be 5 because the formula should consider the lines 4, 5 and 6 only (contiguous lines with label 'a'). Therefore, the prices to be considered should be 3, 4 and 5 and the relevant MAX is 5.
I started building the formula in steps and the first one is to get the row n# where the max price is and I made this formula {=MAX(IF($A$2:A5<>A6,ROW()))}
but I cannot even make this to work.
EDIT
The solution from Tom Sharpe in this thread is almost perfect.
What I didn't mention in the initial question is I want to see the MAX in each line.
Here below is the screenshot with an extra column with what I want to achieve.