View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Highest total of any three consecutive numbers in a range.

Try this:

With your data in the range A1:A10.

=SUMPRODUCT(MAX(A1:A8+A2:A9+A3:A10))

Note the pattern of how each range reference is offset.

--
Biff
Microsoft Excel MVP


wrote in message
...
I am searching for a function or formula that might give me the
biggest sum of three consecutive integers in a range. For example if
I have the numbers 1,5,2,7,8,5,2,4,9,1 in a range of cells, the number
I'm hoping to get is 20 because in the range, the sum of the
consecutive string of 7,8,5 is the biggest.

I'm not looking to sum the three highest numbers in the range. That
would be the sum of 7,8, and 9. What I want to know is the highest
total of any three consecutive numbers.

An example of how it might be used would be to track the peak shift in
a production environment. So let's say that we have a 24 hour day,
and I want to know inside that 24 hour day, what are the 8 consecutive
hours (length of a shift) that produce the most product.

It almost goes without saying, but many thanks to any and all who
would care to help me tackle this one!

-Stephen