View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Excel Formula to Calc Daily Averages?

See if this get you headed in the right direction...

With
Dates entered in B3:AZ3 (in ascending order)
Blood sugar values in B4:AZ11

A1: 7 day average
B1:
=AVERAGE(INDEX(B11:AZ11,1,MATCH(LARGE(B3:AZ3,7),B3 :AZ3,0)):INDEX(B4:AZ4,1,MATCH(LARGE(B3:AZ3,1),B3:A Z3,0)))

A2: 30 day average
B2:
=AVERAGE(INDEX(B11:AZ11,1,MATCH(LARGE(B3:AZ3,MIN(C OUNT(B3:AZ3),30)),B3:AZ3,0)):INDEX(B4:AZ4,1,MATCH( LARGE(B3:AZ3,1),B3:AZ3,0)))

Note: Since text wrap will impact those formulas, they DO NOT contain any
blanks.

Adjust range references to suit your situation.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Don I" wrote:

I'm hoping someone can help me figure out a way to create an Excel
worksheet that will help me to keep track of my daily glucose logs and
give me the average of the last 7 days and for the last 30 days. As
time goes on, I'll add more columns to the excel sheet to represent
add'l dates.

The table below is meant to serve as an example of such an excel sheet
cells A2 and B2 are the cells I'm trying to put these averages in. If
today is 7/16/06, A2 should show the averages of cells D4 through
K10--but exclude from the average any EMPTY cells.

It seems like there should be a way--but I'm just not seeing it.

Thanks.
Don I

NOTE: Regarding the table that I spoke of above, I tried to show a
table to illustrate what I'm asking about, but my reader won't allow me
to do it. The following link shows the table in question--and nothing
else. No images--no banner ads nothing but the table.

http://www.donireland.com/ExcelFormu...Averaging.html