#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default AVERAGE & SUMPRODUCT

I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.

I have the following:

=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")

which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.

(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)

Thoughts?

  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default AVERAGE & SUMPRODUCT

try
=average(if(K2:K13="WMT",M2:M13)) entered as array control-shift-enter
you could also use
=average(if(and(K2:K13="WMT",criteria 2),M2:M13)) entered as array
control-shift-enter

you could use Or instead of And if needed.
"Dave F" wrote:

I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.

I have the following:

=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")

which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.

(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)

Thoughts?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default AVERAGE & SUMPRODUCT

try:

=AVERAGE(IF(K2:K13="WMT",M2:M13))

Enter with Ctrl+Shift+Enter.

If entered correctly, you will get {} brackets round the formula.

HTH

"Dave F" wrote:

I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.

I have the following:

=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")

which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.

(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)

Thoughts?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default AVERAGE & SUMPRODUCT

You could use =averageif() in xl2007.


Dave F wrote:

I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.

I have the following:

=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")

which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.

(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)

Thoughts?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default AVERAGE & SUMPRODUCT

Excellent suggestion. How do I get my employer to install Office 07
on my pc?

The consensus here seems to be that an array formula is the way to go
on pre-XL07 installations.

Thanks to all for the feedback.

On Jul 31, 3:15 pm, Dave Peterson wrote:
You could use =averageif() in xl2007.





Dave F wrote:

I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.


I have the following:


=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")


which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.


(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)


Thoughts?


--

Dave Peterson- Hide quoted text -

- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default AVERAGE & SUMPRODUCT

Ask them?

I think I'd use =sumif()/countif()
until you needed more criteria.



Dave F wrote:

Excellent suggestion. How do I get my employer to install Office 07
on my pc?

The consensus here seems to be that an array formula is the way to go
on pre-XL07 installations.

Thanks to all for the feedback.

On Jul 31, 3:15 pm, Dave Peterson wrote:
You could use =averageif() in xl2007.





Dave F wrote:

I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.


I have the following:


=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")


which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.


(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)


Thoughts?


--

Dave Peterson- Hide quoted text -

- Show quoted text -


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default AVERAGE & SUMPRODUCT

The average(if()) array construction works well for me in the interim.

No luck on getting XL 07 installed till early next year at my co.

Not an issue though.

Thanks for the help.

Dave

On Jul 31, 5:17 pm, Dave Peterson wrote:
Ask them?

I think I'd use =sumif()/countif()
until you needed more criteria.





Dave F wrote:

Excellent suggestion. How do I get my employer to install Office 07
on my pc?


The consensus here seems to be that an array formula is the way to go
on pre-XL07 installations.


Thanks to all for the feedback.


On Jul 31, 3:15 pm, Dave Peterson wrote:
You could use =averageif() in xl2007.


Dave F wrote:


I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.


I have the following:


=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")


which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.


(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)


Thoughts?


--


Dave Peterson- Hide quoted text -


- Show quoted text -


--

Dave Peterson- Hide quoted text -

- Show quoted text -



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
Average nesting within Sumproduct? Twishlist Excel Worksheet Functions 3 July 26th 07 07:53 AM
sumproduct and average functions Turi Excel Worksheet Functions 4 October 23rd 06 04:16 PM
Using Sumproduct to Find Average stevec Excel Discussion (Misc queries) 2 August 3rd 06 10:06 PM
Sumproduct Average heater Excel Discussion (Misc queries) 2 June 2nd 06 10:32 PM
sumproduct & average junoon Excel Worksheet Functions 5 May 25th 06 07:12 AM


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