Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
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!

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
Averageif function Kevin Anderson Excel Worksheet Functions 4 January 29th 08 11:31 AM
Excel needs an AVERAGEIF function similar to SUMIF. Please! Roseland Excel Discussion (Misc queries) 1 May 16th 06 02:22 PM
averageif function curtll Excel Worksheet Functions 8 May 8th 06 03:48 AM
EXCEL -- want to do have ''averageif'' - like sumif function - H. Glenda Excel Worksheet Functions 1 April 5th 05 08:58 PM
AVERAGEIF Function out there? davidad Excel Discussion (Misc queries) 2 January 21st 05 05:52 PM


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