SUMIFS with IF function on sum_range

phelps22

New Member
Joined
Dec 12, 2015
Messages
36
I have a set of SUMIF formula like:

=SUMIFS('Worksheet1'!W:W,'Worksheet1'!AD:AD,Cost!B2,'Worksheet1'!AB:AB,Cost!B3)

But now want to insert criterias on sum_range, let's say

Size > 20, use 'Worksheet1'!Z:Z
<size<=20, use="" 'worksheet1'!y:y
<size<=20, use="" 'worksheet1'!y:y
Size greater than 10 but less than 20, use 'Worksheet1'!Y:Y
the rest, 'Worksheet1'!W:W

How can I modify it to incorporate above criterias on sum_range? As just insert IF functions, too many arguments encountered.</size<=20,></size<=20,>
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
This works for me:

=SUMIFS(IF(H3<=20,Worksheet1!W:W,Worksheet1!Z:Z),Worksheet1!AD:AD,Cost!B2,Worksheet1!AB:AB,Cost!B3)
 
Upvote 0
Like this?

=SUMIFS(IF(Cost!H3<=20,IF(Cost!H3>10,Worksheet1!Y:Y,Worksheet1!W:W),Worksheet1!Z:Z),Worksheet1!AD:AD,Cost!B2,Worksheet1!AB:AB,Cost!B3)
 
Upvote 0
Like this?

=SUMIFS(IF(Cost!H3<=20,IF(Cost!H3>10,Worksheet1!Y:Y,Worksheet1!W:W),Worksheet1!Z:Z),Worksheet1!AD:AD,Cost!B2,Worksheet1!AB:AB,Cost!B3)

Thanks, but full criteria will be like that,
Size > 20, use 'Worksheet1'!Z:Z
<size<=20, use="" 'worksheet1'!y:y
<size<=20, use="" 'worksheet1'!y:y
Size greater than 10 but less than 20, use 'Worksheet1'!Y:Y
Size greater than 5 but less than 10, 'Worksheet1'!X:X
</size<=20,></size<=20,>The rest, 'Worksheet1'!W:W

Will it involve too many argument error on your solution?? How can incorporate all?
 
Upvote 0
Solve it. Seems work

=SUMIFS(IF(Cost!H3<=20,IF(Cost!H3>10,'Worksheet1'!Y:Y,IF(Cost!H3>5,'Worksheet1'!X:X,'Worksheet1'!W:W)),'Worksheet1'!Z:Z)
 
Upvote 0
Solve it. Seems work

=SUMIFS(IF(Cost!H3<=20,IF(Cost!H3>10,'Worksheet1'!Y:Y,IF(Cost!H3>5,'Worksheet1'!X:X,'Worksheet1'!W:W)),'Worksheet1'!Z:Z)

Now I am wanting to enhance table, and give more conditions on it. It will be like that:

Size > 40, use 'Worksheet1'!AB:AB
<size<=20, use="" 'worksheet1'!y:y
<size<=20, use="" 'worksheet1'!y:y
Size greater than 30 but less than 40, use 'Worksheet1'!AA:AA
Size greater than 20 but less than 30, 'Worksheet1'!Z:Z
Size greater than 10 but less than 20, use 'Worksheet1'!Y:Y
Size greater than 5 but less than 10, 'Worksheet1'!X:X
</size<=20,></size<=20,>The rest, 'Worksheet1'!W:W

How can I modify above function to accompany the new sets? Thanks

 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,220
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top