ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Average using Greater Than - Less Than (https://www.excelbanter.com/excel-discussion-misc-queries/102341-average-using-greater-than-less-than.html)

webnntp

Average using Greater Than - Less Than
 
Col A Col B
10 10
20 40
10 20
15 30
40 60
10 20
15 20
40 70
20 30

To find the average of the values in column B where column A is greater
than 15, I use the formula below:

{=AVERAGE(IF(A1:A915,B1:B9,""))}

How do I modify this formula or use another one to find the average of
the values in column B where column A is greater than 15 and less than
40?

Thanks


Dave Peterson

Average using Greater Than - Less Than
 
One way:
=AVERAGE(IF((A1:A915)*(A1:A9<40),B1:B9))
(still array entered)

webnntp wrote:

Col A Col B
10 10
20 40
10 20
15 30
40 60
10 20
15 20
40 70
20 30

To find the average of the values in column B where column A is greater
than 15, I use the formula below:

{=AVERAGE(IF(A1:A915,B1:B9,""))}

How do I modify this formula or use another one to find the average of
the values in column B where column A is greater than 15 and less than
40?

Thanks


--

Dave Peterson

daddylonglegs

Average using Greater Than - Less Than
 

Try this

=AVERAGE(IF((A1:A915)*(A1:A9<40),B1:B9))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=566856


webnntp

Average using Greater Than - Less Than
 
daddylonglegs wrote:
Try this

=AVERAGE(IF((A1:A915)*(A1:A9<40),B1:B9))
--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=566856


Awesome! thanks to both of you.



All times are GMT +1. The time now is 04:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com