Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88029

Finding the highest value in a range

$
0
0

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.

enter image description here

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. enter image description here


Viewing all articles
Browse latest Browse all 88029

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>