Average Less a Month

G

Guest

I have 12 months worth of previous year's data in Excel (January-December)
but only want to graph certain months data. Not sure how to explain this. If
the current month is October, than I want to pull data from January-August;
if current month is December, than I want to pull data from January-October.
Does anyone know how I can do this with a formula? I've exhausted my limited
knowledge and not had any success.

Thank you!
Jani
 
D

Don Guillett

Try something like this.
=sumproduct((month(a2:a22)>=1)*(month(a2:a22)<month(today())-1)*b2:b22)
 
D

David Biddulph

Your subject line talks of Average, but your text talks of a graph. What
are you trying to do?
 
D

Don Guillett

I reread. Instead of sum you wanted average. Try this ARRAY formula entered
using ctrl+shift+enter
=AVERAGE(IF(MONTH(A7:A1000)>1,MONTH(A7:A1000)<MONTH(TODAY()-1),D7:D1000))
 
G

Guest

I haven't had a chance to try what Don wrote yet. The 'average' data is what
is used for the graph data source. Sorry I didn't make that clear.
 

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