Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wynn
 
Posts: n/a
Default Averaging COUNTIF

I want to average numbers in column B, only in column A has a specific term
(in other words, an average of all rates in column B where column A contains
the word "DG").

I am figure I need to use COUNTIF, OFFSET, and AVERAGE functions, but I am
having trouble putting them together. Thanks!
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Wynn

only SUMIF and COUNTIF :)

=SUMIF(A1:A10,"DG",B1:B10)/COUNTIF(A1:A10,"DG")

Cheers
JulieD

"Wynn" wrote in message
...
I want to average numbers in column B, only in column A has a specific term
(in other words, an average of all rates in column B where column A
contains
the word "DG").

I am figure I need to use COUNTIF, OFFSET, and AVERAGE functions, but I am
having trouble putting them together. Thanks!



  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
try the following array formula
=AVERAGE(IF(A1:A100="DG",B1:B100))

--
Regards
Frank Kabel
Frankfurt, Germany

"Wynn" schrieb im Newsbeitrag
...
I want to average numbers in column B, only in column A has a

specific term
(in other words, an average of all rates in column B where column A

contains
the word "DG").

I am figure I need to use COUNTIF, OFFSET, and AVERAGE functions, but

I am
having trouble putting them together. Thanks!


  #4   Report Post  
Wynn
 
Posts: n/a
Default

Frank,
Thank you. This is working very well. I am having a problem however,
because I want to test values for two columns and it does not seem to be
working with the AND function. Am I missing something?:

array formula
=AVERAGE(IF(AND(A1:A100="DG",C1:C100="BG"),B1:B100 ))

"Frank Kabel" wrote:

Hi
try the following array formula
=AVERAGE(IF(A1:A100="DG",B1:B100))

--
Regards
Frank Kabel
Frankfurt, Germany

"Wynn" schrieb im Newsbeitrag
...
I want to average numbers in column B, only in column A has a

specific term
(in other words, an average of all rates in column B where column A

contains
the word "DG").

I am figure I need to use COUNTIF, OFFSET, and AVERAGE functions, but

I am
having trouble putting them together. Thanks!



  #5   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
for some general stuff about this see:
http://www.dicks-blog.com/archives/2...rations-in-arr
ay-formulas/trackback/

In your case try:
=AVERAGE(IF((A1:A100="DG")*(C1:C100="BG"),B1:B100) )

--
Regards
Frank Kabel
Frankfurt, Germany

"Wynn" schrieb im Newsbeitrag
...
Frank,
Thank you. This is working very well. I am having a problem

however,
because I want to test values for two columns and it does not seem to

be
working with the AND function. Am I missing something?:

array formula
=AVERAGE(IF(AND(A1:A100="DG",C1:C100="BG"),B1:B100 ))

"Frank Kabel" wrote:

Hi
try the following array formula
=AVERAGE(IF(A1:A100="DG",B1:B100))

--
Regards
Frank Kabel
Frankfurt, Germany

"Wynn" schrieb im Newsbeitrag
...
I want to average numbers in column B, only in column A has a

specific term
(in other words, an average of all rates in column B where column

A
contains
the word "DG").

I am figure I need to use COUNTIF, OFFSET, and AVERAGE functions,

but
I am
having trouble putting them together. Thanks!






  #6   Report Post  
Wynn
 
Posts: n/a
Default

Thanks, Frank - you always come through for me. Thanks for the site as well.

"Frank Kabel" wrote:

Hi
for some general stuff about this see:
http://www.dicks-blog.com/archives/2...rations-in-arr
ay-formulas/trackback/

In your case try:
=AVERAGE(IF((A1:A100="DG")*(C1:C100="BG"),B1:B100) )

--
Regards
Frank Kabel
Frankfurt, Germany

"Wynn" schrieb im Newsbeitrag
...
Frank,
Thank you. This is working very well. I am having a problem

however,
because I want to test values for two columns and it does not seem to

be
working with the AND function. Am I missing something?:

array formula
=AVERAGE(IF(AND(A1:A100="DG",C1:C100="BG"),B1:B100 ))

"Frank Kabel" wrote:

Hi
try the following array formula
=AVERAGE(IF(A1:A100="DG",B1:B100))

--
Regards
Frank Kabel
Frankfurt, Germany

"Wynn" schrieb im Newsbeitrag
...
I want to average numbers in column B, only in column A has a
specific term
(in other words, an average of all rates in column B where column

A
contains
the word "DG").

I am figure I need to use COUNTIF, OFFSET, and AVERAGE functions,

but
I am
having trouble putting them together. 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
Subtotal And Countif Sheryl Excel Discussion (Misc queries) 4 December 9th 04 07:18 PM
Countif bjg Excel Worksheet Functions 11 November 27th 04 03:32 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM
Countif ??? terryv Excel Worksheet Functions 2 November 8th 04 09:03 AM
countif, again Liz G Excel Worksheet Functions 2 November 1st 04 11:20 PM


All times are GMT +1. The time now is 02:32 AM.

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"