Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Worksheet function?

I have file with several thousand rows, and would like to average one of the
columns based on a second rows groupings. What would be the best way to do
that? Thank you.

Example: (I would like to average all the yellows and all the blues and all
the greens, etc.)

Column A Column B
Yellow 1.34
Yellow 8.2
Yellow 6.11
Blue 7.78
Blue 9.27
Blue 15.7
Green 3.5
Green 1.97
Green 6.55

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Worksheet function?

SUMIF/COUNTIF would get you your answer. I don't believe there is an
AVERAGEIF function.

Dave
--
Brevity is the soul of wit.


"Mike" wrote:

I have file with several thousand rows, and would like to average one of the
columns based on a second rows groupings. What would be the best way to do
that? Thank you.

Example: (I would like to average all the yellows and all the blues and all
the greens, etc.)

Column A Column B
Yellow 1.34
Yellow 8.2
Yellow 6.11
Blue 7.78
Blue 9.27
Blue 15.7
Green 3.5
Green 1.97
Green 6.55

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Worksheet function?

=AVERAGE(IF(A1:A1000="blue",B1:1000))
array formula you have to commit ctrlshiftenter (not just enter)


"Mike" wrote:

I have file with several thousand rows, and would like to average one of the
columns based on a second rows groupings. What would be the best way to do
that? Thank you.

Example: (I would like to average all the yellows and all the blues and all
the greens, etc.)

Column A Column B
Yellow 1.34
Yellow 8.2
Yellow 6.11
Blue 7.78
Blue 9.27
Blue 15.7
Green 3.5
Green 1.97
Green 6.55

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Worksheet function?

Yes, there is AVERAGE(IF(your formula))
ctrlshiftenter

"Dave F" wrote:

SUMIF/COUNTIF would get you your answer. I don't believe there is an
AVERAGEIF function.

Dave
--
Brevity is the soul of wit.


"Mike" wrote:

I have file with several thousand rows, and would like to average one of the
columns based on a second rows groupings. What would be the best way to do
that? Thank you.

Example: (I would like to average all the yellows and all the blues and all
the greens, etc.)

Column A Column B
Yellow 1.34
Yellow 8.2
Yellow 6.11
Blue 7.78
Blue 9.27
Blue 15.7
Green 3.5
Green 1.97
Green 6.55

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Worksheet function?

To be more specific, given the sample range you give below:

=SUMIF(A2:B10,A2,B2:B10)/COUNTIF(A2:A10,A2) will give the average for the
yellows.

Replace the criteria in the SUMIF and COUNTIF functions as necessary.
Assumes that the sample data are in range A1:B10.

Dave

--
Brevity is the soul of wit.


"Mike" wrote:

I have file with several thousand rows, and would like to average one of the
columns based on a second rows groupings. What would be the best way to do
that? Thank you.

Example: (I would like to average all the yellows and all the blues and all
the greens, etc.)

Column A Column B
Yellow 1.34
Yellow 8.2
Yellow 6.11
Blue 7.78
Blue 9.27
Blue 15.7
Green 3.5
Green 1.97
Green 6.55



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Worksheet function?

Yeah I just saw your post. Interesting. I've always just used SUMIF/COUNTIF
for these situations.

Dave
--
Brevity is the soul of wit.


"Teethless mama" wrote:

Yes, there is AVERAGE(IF(your formula))
ctrlshiftenter

"Dave F" wrote:

SUMIF/COUNTIF would get you your answer. I don't believe there is an
AVERAGEIF function.

Dave
--
Brevity is the soul of wit.


"Mike" wrote:

I have file with several thousand rows, and would like to average one of the
columns based on a second rows groupings. What would be the best way to do
that? Thank you.

Example: (I would like to average all the yellows and all the blues and all
the greens, etc.)

Column A Column B
Yellow 1.34
Yellow 8.2
Yellow 6.11
Blue 7.78
Blue 9.27
Blue 15.7
Green 3.5
Green 1.97
Green 6.55

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
How do I get ONLY new info from 1 Worksheet to another automatical Elaine Excel Worksheet Functions 6 July 13th 06 05:45 PM
CELL Function and Worksheet Name in a Cell David Excel Worksheet Functions 2 July 8th 06 11:00 PM
Average Function (include Blank Cells and Zeros) [email protected] Excel Discussion (Misc queries) 17 June 27th 06 01:33 PM
Passing a WorkSheet from a Function??? Mac Lingo Excel Worksheet Functions 3 June 13th 06 08:29 AM
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM


All times are GMT +1. The time now is 02:04 AM.

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

About Us

"It's about Microsoft Excel"