A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Average a group of numbers within an date range.



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2009, 10:05 PM posted to microsoft.public.excel.worksheet.functions
sross
external usenet poster
 
Posts: 3
Default Average a group of numbers within an date range.

I have a spreadsheet that has tickets for an entire year. I have calculated
a field that has the total number of days a ticket was open for each ticket.
I am trying to average the total number of days a ticket is open by month,
to have an average number of days a ticket is open per month. I have tried
this calculation but am not getting a valid number. My dates are in
month/day/year format. 01/01/09. Thanks for your help

=IF(B2=0,0,(AVERAGE(IF((MONTH(Data!$O$3:$O$4834)=1 )*(YEAR(Data!$O$3:$O$4834)=2009),(Data!$AT$3:$AT$4 834)))))
  #2  
Old April 22nd, 2009, 10:18 PM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Average a group of numbers within an date range.

Hi,

Your formula is fine, it's the way you are entering it, it's an array

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike

"sross" wrote:

I have a spreadsheet that has tickets for an entire year. I have calculated
a field that has the total number of days a ticket was open for each ticket.
I am trying to average the total number of days a ticket is open by month,
to have an average number of days a ticket is open per month. I have tried
this calculation but am not getting a valid number. My dates are in
month/day/year format. 01/01/09. Thanks for your help

=IF(B2=0,0,(AVERAGE(IF((MONTH(Data!$O$3:$O$4834)=1 )*(YEAR(Data!$O$3:$O$4834)=2009),(Data!$AT$3:$AT$4 834)))))

  #3  
Old April 22nd, 2009, 10:23 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Average a group of numbers within an date range.

Other than some extra parentheses there's nothing wrong with your formula.

Did you enter it as an array?

--
Biff
Microsoft Excel MVP


"sross" wrote in message
...
I have a spreadsheet that has tickets for an entire year. I have
calculated
a field that has the total number of days a ticket was open for each
ticket.
I am trying to average the total number of days a ticket is open by month,
to have an average number of days a ticket is open per month. I have
tried
this calculation but am not getting a valid number. My dates are in
month/day/year format. 01/01/09. Thanks for your help

=IF(B2=0,0,(AVERAGE(IF((MONTH(Data!$O$3:$O$4834)=1 )*(YEAR(Data!$O$3:$O$4834)=2009),(Data!$AT$3:$AT$4 834)))))



  #5  
Old April 22nd, 2009, 11:16 PM posted to microsoft.public.excel.worksheet.functions
sross
external usenet poster
 
Posts: 3
Default Average a group of numbers within an date range.

Yes, this is what I needed to do, everything is working correctly now.
THANK YOU!!!

"Mike H" wrote:

Hi,

Your formula is fine, it's the way you are entering it, it's an array

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike

"sross" wrote:

I have a spreadsheet that has tickets for an entire year. I have calculated
a field that has the total number of days a ticket was open for each ticket.
I am trying to average the total number of days a ticket is open by month,
to have an average number of days a ticket is open per month. I have tried
this calculation but am not getting a valid number. My dates are in
month/day/year format. 01/01/09. Thanks for your help

=IF(B2=0,0,(AVERAGE(IF((MONTH(Data!$O$3:$O$4834)=1 )*(YEAR(Data!$O$3:$O$4834)=2009),(Data!$AT$3:$AT$4 834)))))

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.