Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Averageifs where subgroups are used

I want to average the travels and works by subgroup.

My data looks like this.

Subgroup Activity Time (minutes)
3641100-1 WORK 30
3641100-2 WORK 60
3641100-2 TRAVEL 60
3641100-2 TRAVEL 30
3641100-3 TRAVEL 120
3619040-1 WORK 60
3619040-1 TRAVEL 30

Avg travel min per sub 65.0
=average of 45,120, and 30
Avg work min per sub 50.0
=average of 30,60, and 60

There will be multiple travels and works per subgroup (as with sub 3641100-2)

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Averageifs where subgroups are used

Opps I screwed up. Total travel time should be 80

=average of 90,120, and 30

Subgroup 3641100-2 had travel time of 60+30.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Averageifs where subgroups are used

Hi,

Assuming your data is in range B4;D11 (including the headers), type travel
in cell C14 and Work in cell C15. Then array enter (Ctrl+Shift+Enter) the
following formula in cell D14 and copy down

=SUMIF($C$5:$C$11,C14,$D$5:$D$11)/SUMPRODUCT(1*(FREQUENCY(IF($C$5:$C$11=$C14,MATCH($ B$5:$B$11,$B$5:$B$11,0)),ROW($C$5:$C$11)-ROW($C$4))0))

Hope this helps



--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Go Bucks!!!" wrote in message
...
I want to average the travels and works by subgroup.

My data looks like this.

Subgroup Activity Time (minutes)
3641100-1 WORK 30
3641100-2 WORK 60
3641100-2 TRAVEL 60
3641100-2 TRAVEL 30
3641100-3 TRAVEL 120
3619040-1 WORK 60
3619040-1 TRAVEL 30

Avg travel min per sub 65.0
=average of 45,120, and 30
Avg work min per sub 50.0
=average of 30,60, and 60

There will be multiple travels and works per subgroup (as with sub
3641100-2)

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Averageifs where subgroups are used

Ashish works great! Thank you for responding so fast. That was a big help.





"Ashish Mathur" wrote:

Hi,

Assuming your data is in range B4;D11 (including the headers), type travel
in cell C14 and Work in cell C15. Then array enter (Ctrl+Shift+Enter) the
following formula in cell D14 and copy down

=SUMIF($C$5:$C$11,C14,$D$5:$D$11)/SUMPRODUCT(1*(FREQUENCY(IF($C$5:$C$11=$C14,MATCH($ B$5:$B$11,$B$5:$B$11,0)),ROW($C$5:$C$11)-ROW($C$4))0))

Hope this helps



--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Go Bucks!!!" wrote in message
...
I want to average the travels and works by subgroup.

My data looks like this.

Subgroup Activity Time (minutes)
3641100-1 WORK 30
3641100-2 WORK 60
3641100-2 TRAVEL 60
3641100-2 TRAVEL 30
3641100-3 TRAVEL 120
3619040-1 WORK 60
3619040-1 TRAVEL 30

Avg travel min per sub 65.0
=average of 45,120, and 30
Avg work min per sub 50.0
=average of 30,60, and 60

There will be multiple travels and works per subgroup (as with sub
3641100-2)

Thanks


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Averageifs where subgroups are used

You are welcome

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Go Bucks!!!" wrote in message
...
Ashish works great! Thank you for responding so fast. That was a big
help.





"Ashish Mathur" wrote:

Hi,

Assuming your data is in range B4;D11 (including the headers), type
travel
in cell C14 and Work in cell C15. Then array enter (Ctrl+Shift+Enter)
the
following formula in cell D14 and copy down

=SUMIF($C$5:$C$11,C14,$D$5:$D$11)/SUMPRODUCT(1*(FREQUENCY(IF($C$5:$C$11=$C14,MATCH($ B$5:$B$11,$B$5:$B$11,0)),ROW($C$5:$C$11)-ROW($C$4))0))

Hope this helps



--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Go Bucks!!!" wrote in message
...
I want to average the travels and works by subgroup.

My data looks like this.

Subgroup Activity Time (minutes)
3641100-1 WORK 30
3641100-2 WORK 60
3641100-2 TRAVEL 60
3641100-2 TRAVEL 30
3641100-3 TRAVEL 120
3619040-1 WORK 60
3619040-1 TRAVEL 30

Avg travel min per sub 65.0
=average of 45,120, and 30
Avg work min per sub 50.0
=average of 30,60, and 60

There will be multiple travels and works per subgroup (as with sub
3641100-2)

Thanks




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
Sumif for groups and subgroups / Excel 2003 mwear Excel Worksheet Functions 9 January 18th 08 08:28 PM
Calculating averages for subgroups PSmith Excel Discussion (Misc queries) 1 November 22nd 07 05:09 PM
Ranking within subgroups Stefan Excel Discussion (Misc queries) 4 June 29th 07 11:07 PM
Ranking Subgroups that are above 750 SteveC Excel Discussion (Misc queries) 1 March 8th 07 08:15 PM
Calculating Percentiles for Subgroups SteveC Excel Discussion (Misc queries) 2 March 5th 07 05:50 PM


All times are GMT +1. The time now is 03:49 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"