Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default averaging a range

How do I average a range of numbers between two criteria? For instance, I'd
want to average only numbers greater than 5 and less than 15.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default averaging a range

=(SUMIF(A1:A5,"5")-SUMIF(A1:A5,"=15"))/(COUNTIF(A1:A5,"5")-COUNTIF(A1:A5,"=15"))

In Excel 2007 and later you can use the AVERAGEIFS function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"suprsonic" wrote in message
...
How do I average a range of numbers between two criteria? For instance,
I'd
want to average only numbers greater than 5 and less than 15.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 31
Default averaging a range

If you are using Excel 2007 you can use the SUMIFS function. It isn't in 2003.

"suprsonic" wrote:

How do I average a range of numbers between two criteria? For instance, I'd
want to average only numbers greater than 5 and less than 15.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default averaging a range

If you have Excel 2007, use the Averageifs function, as in:
=AVERAGEIFS(C7:C11,C7:C11,"5",C7:C11,"<15")

Regards,
Fred

"suprsonic" wrote in message
...
How do I average a range of numbers between two criteria? For instance,
I'd
want to average only numbers greater than 5 and less than 15.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default averaging a range

Hi,

Try this

=sumproduct((A2:A105)*(A2:A10<15)*(A2:A10))/sumproduct((A2:A105)*(A2:A10<15))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"suprsonic" wrote in message
...
How do I average a range of numbers between two criteria? For instance,
I'd
want to average only numbers greater than 5 and less than 15.




  #6   Report Post  
Senior Member
 
Location: Hyderabad
Posts: 237
Default

Quote:
Originally Posted by suprsonic View Post
How do I average a range of numbers between two criteria? For instance, I'd
want to average only numbers greater than 5 and less than 15.

Guys,
yes it is possible to do it by combination any of the formulae Sumif/countif, averageif, sumproduct.

any idea on the performance of the formulae, which runs in shorter period. I know it doest time long time btw any of the function to excute. But imagine if you have lacs of cells in mutiple spreadsheet, even single milli second is a matter in performance.
__________________
Thanks
Bala
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
Averaging times that are not in a range Nancy D Excel Worksheet Functions 3 April 20th 10 05:19 PM
Averaging data across a date range Barry Excel Worksheet Functions 1 December 17th 09 04:58 PM
Averaging data if within a date range KellyF Excel Worksheet Functions 6 October 19th 07 03:45 PM
Changing the range of several averaging functions Hellion Excel Discussion (Misc queries) 1 September 17th 05 02:12 PM
Averaging non-range positive data Susannah Excel Discussion (Misc queries) 1 February 15th 05 02:25 AM


All times are GMT +1. The time now is 10:35 AM.

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"