Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default similar to sumif() but for averages


Does anyone know how to create a formula similar to sumif() but for
averages.


Hence:

I have a:

- range
- criteria
- AVG_range (as opposed to a sum_range)


The formula that I need would be =averageIF(K$2:HB$2,G$2,K3:HB3) which
is similar to =SUMIF(K$2:HB$2,G$2,K3:HB3) but does the averages based
on the criteria.

Are there any experts out there who knows how to do this?


--
Donovan
------------------------------------------------------------------------
Donovan's Profile: http://www.excelforum.com/member.php...o&userid=35234
View this thread: http://www.excelforum.com/showthread...hreadid=566214

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 256
Default similar to sumif() but for averages

Try...

=AVERAGE(IF(K$2:HB$2=G$2,K3:HB3))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
Donovan wrote:

Does anyone know how to create a formula similar to sumif() but for
averages.


Hence:

I have a:

- range
- criteria
- AVG_range (as opposed to a sum_range)


The formula that I need would be =averageIF(K$2:HB$2,G$2,K3:HB3) which
is similar to =SUMIF(K$2:HB$2,G$2,K3:HB3) but does the averages based
on the criteria.

Are there any experts out there who knows how to do this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default similar to sumif() but for averages

You could try this *array* formula:

=Average(IF(K$2:HB$2=G$2,K3:HB3))
--
Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of
the regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually. Also, you must use CSE when
revising the formula.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Donovan" wrote in
message ...

Does anyone know how to create a formula similar to sumif() but for
averages.


Hence:

I have a:

- range
- criteria
- AVG_range (as opposed to a sum_range)


The formula that I need would be =averageIF(K$2:HB$2,G$2,K3:HB3) which
is similar to =SUMIF(K$2:HB$2,G$2,K3:HB3) but does the averages based
on the criteria.

Are there any experts out there who knows how to do this?


--
Donovan
------------------------------------------------------------------------
Donovan's Profile:
http://www.excelforum.com/member.php...o&userid=35234
View this thread: http://www.excelforum.com/showthread...hreadid=566214


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default similar to sumif() but for averages


Youda (u-da) Kings.

Thanks. Works well.


--
Donovan
------------------------------------------------------------------------
Donovan's Profile: http://www.excelforum.com/member.php...o&userid=35234
View this thread: http://www.excelforum.com/showthread...hreadid=566214

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default similar to sumif() but for averages



While I got exited at first, it may have been premature. Not sure if
ya'll can help wrap this one out?

It seems the answer for {=Average(IF(K$2:HB$2=G$2,K3:HB3))}
is wrong. It appears to include blank data as zero's in the
calculation and therefore lower the average to a level lower than it
should be.

In other words, blank data should not be part of the AVG

Note: The average I guess should be when the data is greater than
Zero.

Anyone able to help?


--
Donovan
------------------------------------------------------------------------
Donovan's Profile: http://www.excelforum.com/member.php...o&userid=35234
View this thread: http://www.excelforum.com/showthread...hreadid=566214



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 256
Default similar to sumif() but for averages

To ignore blanks...

=AVERAGE(IF(K$2:HB$2=G$2,IF(K3:HB3<"",K3:HB3)))

To average numbers greater than 0...

=AVERAGE(IF(K$2:HB$2=G$2,IF(K3:HB30,K3:HB3)))

Both formulas need to be confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article ,
Donovan wrote:


While I got exited at first, it may have been premature. Not sure if
ya'll can help wrap this one out?

It seems the answer for {=Average(IF(K$2:HB$2=G$2,K3:HB3))}
is wrong. It appears to include blank data as zero's in the
calculation and therefore lower the average to a level lower than it
should be.

In other words, blank data should not be part of the AVG

Note: The average I guess should be when the data is greater than
Zero.

Anyone able to help?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default similar to sumif() but for averages


Tanks again
:)


--
Donovan
------------------------------------------------------------------------
Donovan's Profile: http://www.excelforum.com/member.php...o&userid=35234
View this thread: http://www.excelforum.com/showthread...hreadid=566214

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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
A formula maxif, similar with sumif or countif Dan Tacu Excel Worksheet Functions 1 June 6th 06 05:30 AM
Excel needs an AVERAGEIF function similar to SUMIF. Please! Roseland Excel Discussion (Misc queries) 1 May 16th 06 02:22 PM
Is there a MAXIF formula similar to the SUMIF formula? tlc Excel Discussion (Misc queries) 2 March 13th 06 08:07 PM
sumif with similar cells Mosqui Excel Worksheet Functions 5 August 20th 05 07:50 AM


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