Just use MAX( ) with an appropriate range. If you have 30 day's worth
of data, then you would have 30 formulae, although I don't see how 20
rows per day for 30 days gives a range from row 7 to row 531.

Do you have a date column? If so, you could use this to determine the
range for each MAX.

Hope this helps.

Pete