Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default average of non-contiguous range based on criteria


I have a summary page with data in rows. Within that row I want the
average of all the numbers that have a specific value in the cell
before it.
For instance:
3 3500 3 3500 7 4000 7 4000 28 5000 28
I want the average of all the numbers with 7 before it or 4000. I
have 10 sets of data to shearch from.

Do I need a vba program to do this?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default average of non-contiguous range based on criteria

Maybe something like this


=SUMPRODUCT(--(A1:K1=7),B1:L1)/COUNTIF(A1:L1,7)

will work for you example



--


Regards,


Peo Sjoblom

"gtslabs" wrote in message
...

I have a summary page with data in rows. Within that row I want the
average of all the numbers that have a specific value in the cell
before it.
For instance:
3 3500 3 3500 7 4000 7 4000 28 5000 28
I want the average of all the numbers with 7 before it or 4000. I
have 10 sets of data to shearch from.

Do I need a vba program to do this?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default average of non-contiguous range based on criteria

Worked Great! - Thank you,
Could you please expalin the use of the -- ?
I have never seen this before.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default average of non-contiguous range based on criteria

Please remember to quote enough of the message to which you are replying to
make the context of your question clear.

I you are talking about the use of the double unary minus, such as in a
SUMPRODUCT formula, try:
http://www.mcgimpsey.com/excel/formulae/doubleneg.html or
http://xldynamic.com/source/xld.SUMPRODUCT.html#format
--
David Biddulph

"gtslabs" wrote in message
...
Worked Great! - Thank you,
Could you please expalin the use of the -- ?
I have never seen this before.



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 based on criteria ramudt Excel Worksheet Functions 7 September 23rd 08 12:37 PM
need to average based on criteria drd Excel Discussion (Misc queries) 2 May 30th 08 10:17 PM
DSUM - non contiguous criteria range Nick''s brother Excel Worksheet Functions 8 January 27th 07 01:39 PM
Calculating an average based on 2 and 3 criteria craggergirl Excel Worksheet Functions 2 February 24th 06 02:37 PM
caluculate an average based on 2 criteria [email protected] Excel Discussion (Misc queries) 3 November 3rd 05 03:34 AM


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