I am trying to find the maximum value of the sum of 2 consecutive numbers in a column of data.
I am using the following formula
=SUMPRODUCT(MAX((K6:K2984)*($F$6:$F$2984)+K5:K2983))
The data goes from K5 to K2984. Column F5 to F2984 has values of either 0 or 1. The aim is to find the maximum sum of 2 consecutive numbers only when there is a 1 in the F column.
The formula above works quite well and finds the highest consecutive number total. My problem is I want to identify the date and time when the max occurred.
The I column has dates for an entire month and the J column has times 15 minutes apart. (00:00, 00:15, 00:30 etc)
To do this I need to find the value in the "I" and J column when the max sum occurs.
So there would be 3 outputs: one for the maximum consecutive sum, one for the date and one for the time. The time of either the first or second component of the sum is ok.
Even identifying the row number where the maximum occurs would be sufficient.
I prefer to do this with a formula rather than a macro.
Does anyone have any suggestions?
I am using the following formula
=SUMPRODUCT(MAX((K6:K2984)*($F$6:$F$2984)+K5:K2983))
The data goes from K5 to K2984. Column F5 to F2984 has values of either 0 or 1. The aim is to find the maximum sum of 2 consecutive numbers only when there is a 1 in the F column.
The formula above works quite well and finds the highest consecutive number total. My problem is I want to identify the date and time when the max occurred.
The I column has dates for an entire month and the J column has times 15 minutes apart. (00:00, 00:15, 00:30 etc)
To do this I need to find the value in the "I" and J column when the max sum occurs.
So there would be 3 outputs: one for the maximum consecutive sum, one for the date and one for the time. The time of either the first or second component of the sum is ok.
Even identifying the row number where the maximum occurs would be sufficient.
I prefer to do this with a formula rather than a macro.
Does anyone have any suggestions?