Hi
You can solve that without VBA.
Suppose your data in M2:M25
Use two columns P and Q (for example) as auxiliary columns. P records the start row of each group and Q the row where it ends
In P2 use and drag down the following formula
Formula:
=IFERROR(AGGREGATE(15,6,ROW($A$1:$A$25)/ABS(($M$1:$M$25<>"")-1),ROW(A1))+1,"")
In Q2 use and drag down
Formula:
=IF(P3="","",P3-2)
To get the maximum use
Formula:
=IF($Q2="","",MAX(INDEX(INDEX($M:$M,$P2,0):INDEX($M:$M,$Q2,0),0)))
To get the minimum use
Formula:
=IF($Q2="","",MIN(INDEX(INDEX($M:$M,$P2,0):INDEX($M:$M,$Q2,0),0)))
See the file for clarification.
Bookmarks