View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Running total over a find number of days

try this idea
AVERAGE(a2:OFFSET(a2,d2,0))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Zorro" wrote in message
...
I would like to find a formula that allows me to sum or average numbers
from
a column of data over a number of days to be entered in a separate cell.

The data consists of a "date" column with not all days included and an
associated column of values for example:

A B C D
Date Value Rolling average Days for average
1/12/2008 150 30
10/12/2008 183
1/1/2009 100
1/5/2009 200
1/6/2009 130
1/10/2009 150

What I would like to be able to do this to calculate an ongoing average
for
each row based on a value (e.g. 30 as shown in column D of the example
above)
entered in another cell.

I have tried to do this using the sumif function but, although it works if
I
use an absolute number in the criteria field, as soon as I try to
reference a
value contained in a cell it returns the value of zero.

I would be very grateful for any help with this.

Many thanks