Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
tommot82
 
Posts: n/a
Default Average a group, where grouping is Conditional on other col.???


Ok, i have what is seemingly an easy problem but i just cant solve its
-simply-

I want to create averages of groupings of data, but the groupings are
conditional on another column

So if my smaple data is below:


Code:
--------------------

col A col B
x 1
x 2
x 3
y 2
y 2
z 4
z 5
z 6
z 7

--------------------


I want to create THREE averages from the data in column B
1) an average for all the data in colB where there is a corresponding
'x' in colA
2) an average for all the data in colB where there is a corresponding
'y' in colA
3) an average for all the data in colB where there is a corresponding
'z' in colA

I cant seem to find an easy answer to this. Can anyone help?


--
tommot82
------------------------------------------------------------------------
tommot82's Profile: http://www.excelforum.com/member.php...o&userid=35252
View this thread: http://www.excelforum.com/showthread...hreadid=550258

  #2   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Average a group, where grouping is Conditional on other col.???

Hi
Try something like this:
=SUMIF(A2:A10,"x",B2:B10)/COUNTIF(A2:A10,"x")
Change the "x" as appropriate.

Andy.

"tommot82" wrote in
message ...

Ok, i have what is seemingly an easy problem but i just cant solve its
-simply-

I want to create averages of groupings of data, but the groupings are
conditional on another column

So if my smaple data is below:


Code:
--------------------

col A col B
x 1
x 2
x 3
y 2
y 2
z 4
z 5
z 6
z 7

--------------------


I want to create THREE averages from the data in column B
1) an average for all the data in colB where there is a corresponding
'x' in colA
2) an average for all the data in colB where there is a corresponding
'y' in colA
3) an average for all the data in colB where there is a corresponding
'z' in colA

I cant seem to find an easy answer to this. Can anyone help?


--
tommot82
------------------------------------------------------------------------
tommot82's Profile:
http://www.excelforum.com/member.php...o&userid=35252
View this thread: http://www.excelforum.com/showthread...hreadid=550258



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional reference on average interest calculation PiPPo Excel Worksheet Functions 1 October 21st 05 07:28 PM
Conditional formula - language needed gamebird Excel Worksheet Functions 7 October 10th 05 11:48 PM
Help with grouping columns couriced New Users to Excel 5 September 2nd 05 05:07 PM
Conditional Average Ignoring Blanks Dirk Friedrichs via OfficeKB.com Excel Worksheet Functions 2 May 6th 05 03:49 PM
Calculate cell row and column Barb R. Excel Discussion (Misc queries) 7 May 2nd 05 07:02 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"