Getting Max values of like cells in a Range
Assume the dates are in A1:A16 and are order the same in each group of 4.
Further assume the values to look at are in C1:C16
Sub Tester1()
Dim maxVal As Double
Set rng1 = Range("A1:A4")
i = 0
For Each cell In rng1
i = i + 1
maxVal = Application.Max(cell.Offset(0, 2), _
cell.Offset(4, 2), cell.Offset(8, 2), cell.Offset(12, 2))
Debug.Print cell.Text, maxVal
Next
End Sub
--
Regards,
Tom Ogilvy
"ibeetb" wrote in message
...
I have a 2 ranges both with 16 rows. 1 column has dates with just 4 dates
being repeated 4 times, which make up the 16 rows. The other column has
values that correspond to each of the dates.
I need a procedure to scroll through the dates and get the max value from
the value column of all LIKE dates.....
Is this possible
|