A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Average with Conditions



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2010, 01:38 AM posted to microsoft.public.excel.worksheet.functions
Curtis[_6_]
external usenet poster
 
Posts: 18
Default Average with Conditions

I need to a formula that will look at column c and if it contains a certain
text say "dog" I want to average the price located in column H

Thanks
--
ce
  #2  
Old April 10th, 2010, 02:03 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Average with Conditions

Try one of these...

Excel 2007 or later:

=AVERAGEIF(C2:C10,"dog",H2:H10)

Any version of Excel:

=SUMIF(C2:C10,"dog",H2:H10)/COUNTIF(C2:C10,"dog")

This one is array entered:

=AVERAGE(IF(C2:C10="dog",H2:H10))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Curtis" .(do not spam) wrote in message
...
I need to a formula that will look at column c and if it contains a certain
text say "dog" I want to average the price located in column H

Thanks
--
ce



  #3  
Old April 10th, 2010, 02:39 AM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default Average with Conditions

=AVERAGE(IF(C2:C100="dog",H2:H100))

ctrl+shift+enter, not just enter


"Curtis" wrote:

I need to a formula that will look at column c and if it contains a certain
text say "dog" I want to average the price located in column H

Thanks
--
ce

  #4  
Old April 10th, 2010, 03:01 AM posted to microsoft.public.excel.worksheet.functions
ozgrid.com
external usenet poster
 
Posts: 328
Default Average with Conditions

I would avoid array formulas and simply use;
=SUMIF(C1:C100,"dog",H1:H100)/COUNTIF(C1:C100,"dog")


--
Regards
Dave Hawley
www.ozgrid.com

"Curtis" .(do not spam) wrote in message
...
I need to a formula that will look at column c and if it contains a certain
text say "dog" I want to average the price located in column H

Thanks
--
ce


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.