Converting Weekly Data into Monthly Averages

K

Kaine

Could someone please show me a formula to average weekly data into monthly.

I have a spreadhseet:
Date Data
2/1/99 1.15
9/1/99 2.42
16/1/99 1.24
through to.....
25/2/05 3.54

How can i calculate the average of every month between 1999 and 2005?
In other words, i need something which looks up all the weeks in a
particular month (ie Jan 2001) and averages them out into a table:

1999 2000 ......... 2005
Jan 2.45 6.42
Feb 3.64 etc etc.

I was thinking vlookup, but don't know how to average in a vlookup.

I would appreciate some help.
 
M

Max

One way to get it in the way you want ..

Assume the source data below
is in Sheet1, cols A and B,
data from row2 down
Date Data
2/1/99 1.15
9/1/99 2.42
16/1/99 1.24
through to.....
25/2/05 3.54

and assume this table below is in Sheet2,
with col A containing *text* (in A2 down): Jan, Feb, ..
and with cols B, C .. across housing: 1999, 2000, ..
1999 2000 ......... 2005
Jan 2.45 6.42
Feb 3.64 etc etc.

Put in the formula bar for B2:

=IF(ISERROR(AVERAGE(IF((TEXT(Sheet1!$A$2:$A$100,"mmm")=$A2)*(TEXT(Sheet1!$A$
2:$A$100,"yyyy")+0=B$1),Sheet1!$B$2:$B$100))),"",AVERAGE(IF((TEXT(Sheet1!$A$
2:$A$100,"mmm")=$A2)*(TEXT(Sheet1!$A$2:$A$100,"yyyy")+0=B$1),Sheet1!$B$2:$B$
100)))

Array-enter the formula in B2,
i.e. press CTRL+SHIFT+ENTER
instead of just pressing ENTER

Copy B2 across and fill down to populate the table
(or copy down and fill across)

Blanks "" will be returned (instead of #DIV/0!)
if there are divisional calc errors (e.g.: 0/0, xx/0)
for a neater output in the table

Adapt to suit the 2 ranges: $A$2:$A$100, $B$2:$B$100
and the source data sheetname: Sheet1
 

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