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  

Calculating MAX, MIN & AVG for each year



 
 
Thread Tools Display Modes
  #1  
Old September 26th, 2008, 08:28 AM posted to microsoft.public.excel.worksheet.functions
dc059
external usenet poster
 
Posts: 6
Default Calculating MAX, MIN & AVG for each year

I have a long list of data, from which I need to calculate the Maximum,
Minimum and Average values for each seperate year. The data spans many
years. An extract is provided below:

Row Column A Column B
1 "full_date" "full_con"
2 17/12/07 13.3
3 21/12/07 18.3
4 23/12/07 8.1
5 24/12/07 8.1
6 7/01/08 12.4
7 20/01/08 11.6
8 27/01/08 12.3
9 8/02/08 14.0

The data is sorted in date order and contained in named ranges as indicated.

Any suggestions and/or assistance will be greatly appreciated. I've looked
at the MATCH & INDEX functions, but couldn't make sence of them in this
context.

--
Brisbane, Australia
  #2  
Old September 26th, 2008, 09:16 AM posted to microsoft.public.excel.worksheet.functions
Mike H
external usenet poster
 
Posts: 8,419
Default Calculating MAX, MIN & AVG for each year

Hi,

Try these

=AVERAGE(IF(YEAR($A$2:$A$9)=2007,$B$2:$B$9,FALSE))
=MIN(IF(YEAR($A$2:$A$9)=2007,$B$2:$B$9,FALSE))
=MAX(IF(YEAR($A$2:$A$9)=2007,$B$2:$B$9,FALSE))

All of these are array formula and must be commited using 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.

Mike
"dc059" wrote:

I have a long list of data, from which I need to calculate the Maximum,
Minimum and Average values for each seperate year. The data spans many
years. An extract is provided below:

Row Column A Column B
1 "full_date" "full_con"
2 17/12/07 13.3
3 21/12/07 18.3
4 23/12/07 8.1
5 24/12/07 8.1
6 7/01/08 12.4
7 20/01/08 11.6
8 27/01/08 12.3
9 8/02/08 14.0

The data is sorted in date order and contained in named ranges as indicated.

Any suggestions and/or assistance will be greatly appreciated. I've looked
at the MATCH & INDEX functions, but couldn't make sence of them in this
context.

--
Brisbane, Australia

  #3  
Old September 27th, 2008, 02:23 AM posted to microsoft.public.excel.worksheet.functions
dc059
external usenet poster
 
Posts: 6
Default Calculating MAX, MIN & AVG for each year

Mike,

Many thanks - I've got the MAX & MIN formulas working, but the AVERAGE
doesn't. I am using the array command (CTRL+SHIFT+Enter), but it only places
a curly bracket at the start of the equation not the also at the end - I end
up with a result of "TRUE" or "FALSE"; not a value. "TRUE" is returned when
I use a small sample set of data; "FALSE" when I reference the total data set
(using the named range)which contains numerous "null" or zero values. Should
I be using the AVERAGEIF function? If so, any suggestions on using it in
this context would again be appreciated.

DC
--
Brisbane, Australia


"Mike H" wrote:

Hi,

Try these

=AVERAGE(IF(YEAR($A$2:$A$9)=2007,$B$2:$B$9,FALSE))
=MIN(IF(YEAR($A$2:$A$9)=2007,$B$2:$B$9,FALSE))
=MAX(IF(YEAR($A$2:$A$9)=2007,$B$2:$B$9,FALSE))

All of these are array formula and must be commited using 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.

Mike
"dc059" wrote:

I have a long list of data, from which I need to calculate the Maximum,
Minimum and Average values for each seperate year. The data spans many
years. An extract is provided below:

Row Column A Column B
1 "full_date" "full_con"
2 17/12/07 13.3
3 21/12/07 18.3
4 23/12/07 8.1
5 24/12/07 8.1
6 7/01/08 12.4
7 20/01/08 11.6
8 27/01/08 12.3
9 8/02/08 14.0

The data is sorted in date order and contained in named ranges as indicated.

Any suggestions and/or assistance will be greatly appreciated. I've looked
at the MATCH & INDEX functions, but couldn't make sence of them in this
context.

--
Brisbane, Australia

 




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 11:06 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.