How do I do this in Excel 2003?

T

TY

Column A is just an ascending list of dates of every day from 1/1/1970
to today. Column B are data associated with each day.

Elsewhere on the same worksheet I would like to be able to enter a
date in one cell, a number in another cell (let's call the number
"N"), and in a third cell have a formula that takes that date and
number, looks into the above data, and calculates an N day average of
the Column B data from that date forward.

Any help would be much appreciated.

Thanks
 
L

Lars-Åke Aspelin

Column A is just an ascending list of dates of every day from 1/1/1970
to today. Column B are data associated with each day.

Elsewhere on the same worksheet I would like to be able to enter a
date in one cell, a number in another cell (let's call the number
"N"), and in a third cell have a formula that takes that date and
number, looks into the above data, and calculates an N day average of
the Column B data from that date forward.

Any help would be much appreciated.

Thanks

Try this:

The date is in cell C1, the number N is in cell D1.
in cell E1 you put

=AVERAGE(OFFSET(A1,C1-A1,1,D1,1))

Hope this helps / Lars-Åke
 
T

TY

Try this:

The date is in cell C1, the number N is in cell D1.
in cell E1 you put

=AVERAGE(OFFSET(A1,C1-A1,1,D1,1))

Hope this helps / Lars-Åke


That works! Thank you very much.

TY
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top