#1   Report Post  
Posted to microsoft.public.excel.misc
tg tg is offline
external usenet poster
 
Posts: 58
Default AverageIf

Is there a way to average a range of data?

For example: I have a column with values 1,2,3,4,5...10 and I want to
average those values greater than 2 but less than 8.

I *think* the AverageIfs will work but it is my understanding that this
function is only valid in the most current versions of excel. If so, I would
like to find a function that is more compatible.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default AverageIf

Maybe

=AVERAGE(IF($A$1:$A$152,IF(A1:A15<8,A1:A15)))

Array entered with Ctrl+Shift+Enter

Mike

"TG" wrote:

Is there a way to average a range of data?

For example: I have a column with values 1,2,3,4,5...10 and I want to
average those values greater than 2 but less than 8.

I *think* the AverageIfs will work but it is my understanding that this
function is only valid in the most current versions of excel. If so, I would
like to find a function that is more compatible.

Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 171
Default AverageIf

I'll confess my bias against array formulas, and therefore suggest an
alternative, which goes back to the definition of average: total / count.
So I'd calculate the conditional average as sumif/countif:

(sumif(range,"2",sum_range)-sumif(range,"=8",sum_range)) /
(countif(range,"2")-countif(range("=8"))

"TG" wrote:

Is there a way to average a range of data?

For example: I have a column with values 1,2,3,4,5...10 and I want to
average those values greater than 2 but less than 8.

I *think* the AverageIfs will work but it is my understanding that this
function is only valid in the most current versions of excel. If so, I would
like to find a function that is more compatible.

Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default AverageIf

Here is yet a different way
=SUMPRODUCT(--(F6:F152),--(F6:F15<8),F6:F15)/SUMPRODUCT(--(F6:F152),--(F6:F15<8))

If you want to include either 2 or 8 change the inequality to = or <=
respectively.
--
Wag more, bark less


"TG" wrote:

Is there a way to average a range of data?

For example: I have a column with values 1,2,3,4,5...10 and I want to
average those values greater than 2 but less than 8.

I *think* the AverageIfs will work but it is my understanding that this
function is only valid in the most current versions of excel. If so, I would
like to find a function that is more compatible.

Thank you.



  #6   Report Post  
Posted to microsoft.public.excel.misc
tg tg is offline
external usenet poster
 
Posts: 58
Default AverageIf

You guys all rock. All these methods work and are exactly what I was after.

Thank you!

"Brad" wrote:

Here is yet a different way
=SUMPRODUCT(--(F6:F152),--(F6:F15<8),F6:F15)/SUMPRODUCT(--(F6:F152),--(F6:F15<8))

If you want to include either 2 or 8 change the inequality to = or <=
respectively.
--
Wag more, bark less


"TG" wrote:

Is there a way to average a range of data?

For example: I have a column with values 1,2,3,4,5...10 and I want to
average those values greater than 2 but less than 8.

I *think* the AverageIfs will work but it is my understanding that this
function is only valid in the most current versions of excel. If so, I would
like to find a function that is more compatible.

Thank you.

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
AVERAGEIF and group?? [email protected] Excel Worksheet Functions 4 April 30th 08 01:18 PM
Averageif help smeldawg Excel Discussion (Misc queries) 7 April 15th 08 10:28 PM
AverageIF coastal Excel Discussion (Misc queries) 1 November 13th 07 11:28 PM
averageif name Excel Worksheet Functions 1 May 4th 06 05:27 PM
averageif rudy Excel Discussion (Misc queries) 5 April 27th 06 11:20 PM


All times are GMT +1. The time now is 01:03 PM.

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"