Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Averageif function with range that includes non-consecutive cells

I am trying to average a range of numbers if the values are less than or
equal to 5. The range includes non-consecutive cells. I have attempted two
different versions of the averageif formula (see below). Both versions
return a #VALUE error.

=AVERAGEIF((P6,R6,S6,T6,U6,V6,X6,Y6,Z6),"<=5")
=AVERAGEIF((P6,R6:V6,X6:Z6),"<=5")

Thanks,

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Averageif function with range that includes non-consecutive cells

Alternative

=SUM(SUMIF(INDIRECT({"P6","R6:V6","X6:Z6"}),"<=5") )/
SUM(COUNTIF(INDIRECT({"P6","R6:V6","X6:Z6"}),"<=5" ))

If this post helps click Yes
---------------
Jacob Skaria


"Daniel Collison" wrote:

I am trying to average a range of numbers if the values are less than or
equal to 5. The range includes non-consecutive cells. I have attempted two
different versions of the averageif formula (see below). Both versions
return a #VALUE error.

=AVERAGEIF((P6,R6,S6,T6,U6,V6,X6,Y6,Z6),"<=5")
=AVERAGEIF((P6,R6:V6,X6:Z6),"<=5")

Thanks,

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Averageif function with range that includes non-consecutive ce

Jacob: The formula worked great. However, the data for which the
calculation was intended spanned 1,400 rows. I tried to copy the formula to
the other 1,399 rows, but the reference to row 6 remained the same.

However, the formula that T. Valko posted worked great and I was able to
successfully copy to other rows.

Thanks for your input!

Daniel

"Jacob Skaria" wrote:

Alternative

=SUM(SUMIF(INDIRECT({"P6","R6:V6","X6:Z6"}),"<=5") )/
SUM(COUNTIF(INDIRECT({"P6","R6:V6","X6:Z6"}),"<=5" ))

If this post helps click Yes
---------------
Jacob Skaria


"Daniel Collison" wrote:

I am trying to average a range of numbers if the values are less than or
equal to 5. The range includes non-consecutive cells. I have attempted two
different versions of the averageif formula (see below). Both versions
return a #VALUE error.

=AVERAGEIF((P6,R6,S6,T6,U6,V6,X6,Y6,Z6),"<=5")
=AVERAGEIF((P6,R6:V6,X6:Z6),"<=5")

Thanks,

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Averageif function with range that includes non-consecutive cells

One way...

=(SUMIF(R6:V6,"<=5")+SUMIF(X6:Z6,"<=5")+(P6<=5)*P6 )/INDEX(FREQUENCY((P6,R6:V6,X6:Z6),5),1)

--
Biff
Microsoft Excel MVP


"Daniel Collison" wrote in
message ...
I am trying to average a range of numbers if the values are less than or
equal to 5. The range includes non-consecutive cells. I have attempted
two
different versions of the averageif formula (see below). Both versions
return a #VALUE error.

=AVERAGEIF((P6,R6,S6,T6,U6,V6,X6,Y6,Z6),"<=5")
=AVERAGEIF((P6,R6:V6,X6:Z6),"<=5")

Thanks,



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Averageif function with range that includes non-consecutive cells

Try this...

=(SUMIF(R6:V6,"<=5")+SUMIF(X6:Z6,"<=5")+(P6<=5)*P6 )/INDEX(FREQUENCY((P6,R6:V6,X6:Z6),5),1)



--
Biff
Microsoft Excel MVP


"Daniel Collison" wrote:

I am trying to average a range of numbers if the values are less than or
equal to 5. The range includes non-consecutive cells. I have attempted two
different versions of the averageif formula (see below). Both versions
return a #VALUE error.

=AVERAGEIF((P6,R6,S6,T6,U6,V6,X6,Y6,Z6),"<=5")
=AVERAGEIF((P6,R6:V6,X6:Z6),"<=5")

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
averageif for a range of values in another column -ken Excel Discussion (Misc queries) 2 April 26th 09 02:52 AM
Consecutive date range on consecutive worksheets john3478 Excel Worksheet Functions 3 January 14th 09 10:54 PM
Auto-filter includes too much range Atreides Excel Discussion (Misc queries) 4 May 15th 08 01:23 AM
How to drag and autofill a non consecutive range of cells? PH Excel Discussion (Misc queries) 1 March 9th 06 07:48 PM
=max(range includes #N/As) David Excel Worksheet Functions 3 September 14th 05 05:00 PM


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