ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Average Less a Month (https://www.excelbanter.com/excel-discussion-misc-queries/159800-average-less-month.html)

Jani

Average Less a Month
 
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

Don Guillett

Average Less a Month
 
Try something like this.
=sumproduct((month(a2:a22)=1)*(month(a2:a22)<mont h(today())-1)*b2:b22)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jani" wrote in message
...
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



David Biddulph[_2_]

Average Less a Month
 
Your subject line talks of Average, but your text talks of a graph. What
are you trying to do?
--
David Biddulph

"Jani" wrote in message
...
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




Don Guillett

Average Less a Month
 
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)<MONT H(TODAY()-1),D7:D1000))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jani" wrote in message
...
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



Jani

Average Less a Month
 
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.

"David Biddulph" wrote:

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

"Jani" wrote in message
...
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






All times are GMT +1. The time now is 01:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com