ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sumif with two Criteria (https://www.excelbanter.com/excel-worksheet-functions/121282-sumif-two-criteria.html)

Rob

Sumif with two Criteria
 
I am using a Sumif formula to return the sum of values less than 50 in
column D which works fine except that I now need it to return less than 50
but greater than 15. Whist the below is an example only, the spreadsheet
Book2 varies in range week over week which is why I have defined the range
$D:$D.

I have tried "15#AND#<50 in cell B3 but to no avail. Is there a way to
achive this?

Thanks, Rob

=SUMIF([Book2]Sheet1!$D:$D,B3,[Book2]Sheet1!$D:$D)

B3 contains the text "<50



ryanb.

Sumif with two Criteria
 
"Rob" wrote in message
...
I am using a Sumif formula to return the sum of values less than 50 in
column D which works fine except that I now need it to return less than 50
but greater than 15. Whist the below is an example only, the spreadsheet
Book2 varies in range week over week which is why I have defined the range
$D:$D.

I have tried "15#AND#<50 in cell B3 but to no avail. Is there a way to
achive this?

Thanks, Rob

=SUMIF([Book2]Sheet1!$D:$D,B3,[Book2]Sheet1!$D:$D)

B3 contains the text "<50

=====================
Try:

=SUMPRODUCT(--([Book2]Sheet1!$D$1:$D$3000015),--([Book2]Sheet1!$D$!:$D$30000<50),([Book2]Sheet1!$D$1:$D$30000))

You will need to replace $D$1:$D$30000 with the proper range if you have
more than 30000 rows or if your data does not start on row 1. SUMPRODUCT
does not allow for entire column references.

HTH

ryanb.



T. Valko

Sumif with two Criteria
 
Try this:

SUMIF is unreliable between files if one of the files is closed so use
SUMPRODUCT:

A3 = 15
B3 = 50

=SUMPRODUCT(--([Book2]Sheet1!D1:D20A3),--([Book2]Sheet1!D1:D20<B3),[Book2]Sheet1!D1:D20)

Note that with SUMPRODUCT you can't use entire columns (unless you're using
Excel 2007).

Biff

"Rob" wrote in message
...
I am using a Sumif formula to return the sum of values less than 50 in
column D which works fine except that I now need it to return less than 50
but greater than 15. Whist the below is an example only, the spreadsheet
Book2 varies in range week over week which is why I have defined the range
$D:$D.

I have tried "15#AND#<50 in cell B3 but to no avail. Is there a way to
achive this?

Thanks, Rob

=SUMIF([Book2]Sheet1!$D:$D,B3,[Book2]Sheet1!$D:$D)

B3 contains the text "<50




Rob

Sumif with two Criteria
 
Thanks for the quick replies, Sumproduct works a treat.

"Rob" wrote in message
...
I am using a Sumif formula to return the sum of values less than 50 in
column D which works fine except that I now need it to return less than 50
but greater than 15. Whist the below is an example only, the spreadsheet
Book2 varies in range week over week which is why I have defined the range
$D:$D.

I have tried "15#AND#<50 in cell B3 but to no avail. Is there a way to
achive this?

Thanks, Rob

=SUMIF([Book2]Sheet1!$D:$D,B3,[Book2]Sheet1!$D:$D)

B3 contains the text "<50





All times are GMT +1. The time now is 03:37 PM.

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