Sum-If with Multiple Criteria

jjramirez85

New Member
Joined
May 21, 2014
Messages
19
Hello,

In column C, I want the following action: forward calculation if the criteria is met but reverse calculation if other criteria is met. This is a two-way action.
if from dept = "Step 1" & to dept ="Step 2", then QTY * WEIGHT
if from dept = "Step 2" & to dept ="Step 1", then QTY * WEIGHT (negative)

<colgroup><col span="7"></colgroup><tbody>
</tbody>


ABCABC
1FROM DEPTTO DEPTQTYWEIGHTTOTAL WEIGHT
2STEP 1STEP 2100.55
3STEP 2STEP 150.75-3.75

<colgroup><col span="6"></colgroup><tbody>
</tbody>
 

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
Not sure why you are repeating columns A, B, and C, I am proceeding with the assumption that QTY is in column D, WEIGHT is in column R, and TOTAL WEIGHT is in column E.

Then, in E2 enter this formula:
Code:
=IF(AND(B2="STEP 1",C2="STEP 2"),C2*D2,IF(AND(B2="STEP 2",C2="STEP 1"),-C2*D2,""))
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,392
Members
449,081
Latest member
JAMES KECULAH

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