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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Is there an AVERAGEIF function in excel?



 
 
Thread Tools Display Modes
  #1  
Old November 9th, 2009, 05:00 PM posted to microsoft.public.excel.misc
LisaB
external usenet poster
 
Posts: 34
Default Is there an AVERAGEIF function in excel?

I'm trying to average the values in one column if another column's value is
true. I know there is a sumif and a countif, but couldn not find an
averageif. Any help would be much appreciated!

  #2  
Old November 9th, 2009, 05:15 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Is there an AVERAGEIF function in excel?

There is an AVERAGEIF function in Excel 2007 but not in earlier versions. If
you looked for it and didn't find it then you probably aren't using Excel
2007.

average the values in one column if another
column's value is true.


Assuming the true's are Boolean (logical) TRUE and not TEXT true.

This array formula** will work in any version.

Assuming that the range with TRUE doesn't contain any text or numbers.

=AVERAGE(IF(B1:B20,A1:A20))

Where A1:A20 are the values to average.B1:B20 is the range that might
contain TRUE.

** 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


"lisab" wrote in message
...
I'm trying to average the values in one column if another column's value
is
true. I know there is a sumif and a countif, but couldn not find an
averageif. Any help would be much appreciated!



  #3  
Old November 9th, 2009, 05:16 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Is there an AVERAGEIF function in excel?

Hi,

If you have excel 2007 then there is an averageif

=AVERAGEIF(A1:A20,"Sometext",B1:B20)


If you don't then there are several ways. here's an array formula way
=AVERAGE(IF(A1:A20="Sometext",B1:B20))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

Mike

"lisab" wrote:

I'm trying to average the values in one column if another column's value is
true. I know there is a sumif and a countif, but couldn not find an
averageif. Any help would be much appreciated!

  #4  
Old November 9th, 2009, 05:16 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Is there an AVERAGEIF function in excel?

You must be using 2003. AVERAGEIF() is available from 2007 version onwards.

Try the array formula. If a2:A10 = E2 then average C2:c10
=AVERAGE(IF((A2:A10=E2),C2:C10))

Please note that this is an array formula. You create array formulas in the
same way that you create other formulas, except you press CTRL+SHIFT+ENTER to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=formula}"

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


"lisab" wrote:

I'm trying to average the values in one column if another column's value is
true. I know there is a sumif and a countif, but couldn not find an
averageif. Any help would be much appreciated!

  #5  
Old November 9th, 2009, 05:38 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Is there an AVERAGEIF function in excel?

You must be using 2003.

There are versions of Excel before Excel 2003! I use one of them!

--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
You must be using 2003. AVERAGEIF() is available from 2007 version
onwards.

Try the array formula. If a2:A10 = E2 then average C2:c10
=AVERAGE(IF((A2:A10=E2),C2:C10))

Please note that this is an array formula. You create array formulas in
the
same way that you create other formulas, except you press CTRL+SHIFT+ENTER
to
enter the formula. If successful in 'Formula Bar' you can notice the curly
braces at both ends like "{=formula}"

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


"lisab" wrote:

I'm trying to average the values in one column if another column's value
is
true. I know there is a sumif and a countif, but couldn not find an
averageif. Any help would be much appreciated!



  #6  
Old November 9th, 2009, 06:46 PM posted to microsoft.public.excel.misc
Luke M
external usenet poster
 
Posts: 2,672
Default Is there an AVERAGEIF function in excel?

As Mike H and Jacob have mentioned, there are several ways to overcome this.
IMO, it is an unneeded function as you can simply do:

=SUMIF(A:A,"Condition",B:B)/COUNTIF(A:A,"Condition")

Note that this is not an array formula.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"lisab" wrote:

I'm trying to average the values in one column if another column's value is
true. I know there is a sumif and a countif, but couldn not find an
averageif. Any help would be much appreciated!

 




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 05:44 PM.


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