ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Combining IF and multiple SUMIF statements, if A>0 & B is between (https://www.excelbanter.com/excel-worksheet-functions/8586-combining-if-multiple-sumif-statements-if-%3E0-b-between.html)

Lee

Combining IF and multiple SUMIF statements, if A>0 & B is between
 
Thanks for the help with my last post.

Im using the following formula to sum column K when the corresponding
number in column BE is between + - 50. AW122 houses -50 and AW123 50.

=SUMIF(BE2:BE118,"="&$AW122,$K2:$K118)-SUMIF(BE2:BE118,""&$AW123,$K2:$K118)

Now Id like to determine the sum for only the positive values in column K.
If the number in column K is greater than 0 and a corresponding number in
column BE is between + - 50, sum the number in column K. The sum in the
example below would be 1

K BE
-0.2 45
1 -43
0.3 54

Thanks for your help.


Aladin Akyurek

The additional condition calls for a different function...

=SUMPRODUCT(--(BE2:BE118=$AW122),--(BE2:BE118<=$AW123),--($K2:$K1180),$K2:$K118)

Note that this type of formulas does not admit whole column refereces
like K:K.

Lee wrote:
Thanks for the help with my last post.

Im using the following formula to sum column K when the corresponding
number in column BE is between + - 50. AW122 houses -50 and AW123 50.

=SUMIF(BE2:BE118,"="&$AW122,$K2:$K118)-SUMIF(BE2:BE118,""&$AW123,$K2:$K118)

Now Id like to determine the sum for only the positive values in column K.
If the number in column K is greater than 0 and a corresponding number in
column BE is between + - 50, sum the number in column K. The sum in the
example below would be 1

K BE
-0.2 45
1 -43
0.3 54

Thanks for your help.



All times are GMT +1. The time now is 05:35 PM.

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