Adding every other column with criteria

tycasey17

Board Regular
Joined
Sep 26, 2013
Messages
93
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I'm trying to add multiple columns based on a code in between the number. I tried doing a =SUMIF but I wasn't figuring out how to adjust it. The reason I have it this way is because I'll order everything together, but it will come in piece by piece. I use three codes: OO - On Order; REC - Received; ISS - Issued. The bold is the end result I would like to have for the tracking I'm planning on doing.

Coat StatusCoat QTYPants StatusPants QTYShirt StatusShirt QTYTOTAL OOTOTAL RECTOTAL ISS
Doe, JohnOO1OO1REC1210
Doe, JaneISS2OO1REC2122
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Check this and revert -

Book1
ABCDEFGHIJKLM
1Coat StatusCoat QTYPants StatusPants QTYShirt StatusShirt QTYOORECISSTOTAL OOTOTAL RECTOTAL ISS
2Doe, JohnOO1OO1REC1210210
3Doe, JaneISS2OO1REC2122122
Sheet1
Cell Formulas
RangeFormula
H2:J3H2=IF($B2=H$1,$C2,0)+IF($D2=H$1,$E2,0)+IF($F2=H$1,$G2,0)
 
Upvote 1
Another option
Fluff.xlsm
ABCDEFGHIJ
1Coat StatusCoat QTYPants StatusPants QTYShirt StatusShirt QTYTOTAL OOTOTAL RECTOTAL ISS
2Doe, JohnOO1OO1REC1210
3Doe, JaneISS2OO1REC2122
Sheet5
Cell Formulas
RangeFormula
H2:H3H2=SUMIFS(C2:G2,B2:F2,"OO")
I2:I3I2=SUMIFS(C2:G2,B2:F2,"rec")
J2:J3J2=SUMIFS(C2:G2,B2:F2,"iss")
 
Upvote 1
Solution
Edit: Oops, left the post open and didn't see other solutions.

Perhaps this:

Book1 11-27-2023.xlsx
ABCDEFGHIJ
1Coat StatusCoat QTYPants StatusPants QTYShirt StatusShirt QTYTOTAL OOTOTAL RECTOTAL ISS
2Doe, JohnOO1OO1REC1210
3Doe, JaneISS2OO1REC2122
Sheet4
Cell Formulas
RangeFormula
H2:H3H2=SUMPRODUCT(($B2="OO")*$C2+($D2="OO")*$E2+($F2="OO")*$G2)
I2:I3I2=SUMPRODUCT(($B2="REC")*$C2+($D2="REC")*$E2+($F2="REC")*$G2)
J2:J3J2=SUMPRODUCT(($B2="ISS")*$C2+($D2="ISS")*$E2+($F2="ISS")*$G2)
 
Upvote 1
Using @Fluff 's idea I generated Option 2
You can check either Option 1 or Option 2 whichever suits you -

Book2
ABCDEFGHIJKLMNOP
1Coat StatusCoat QTYPants StatusPants QTYShirt StatusShirt QTYOORECISSOORECISSTOTAL OOTOTAL RECTOTAL ISS
2Doe, JohnOO1OO1REC1210210210
3Doe, JaneISS2OO1REC2122122122
4
5Option 1Option 2
6
Sheet1
Cell Formulas
RangeFormula
H2:J3H2=IF($B2=H$1,$C2,0)+IF($D2=H$1,$E2,0)+IF($F2=H$1,$G2,0)
K2:M3K2=SUMIFS($C2:$G2,$B2:$F2,K$1)
 
Upvote 1
Another SUMIFS option that uses a single formula copied to all cells.

23 11 29.xlsm
BCDEFGHIJ
1Coat StatusCoat QTYPants StatusPants QTYShirt StatusShirt QTYTOTAL OOTOTAL RECTOTAL ISS
2OO1OO1REC1210
3ISS2OO1REC2122
SUMIFS
Cell Formulas
RangeFormula
H2:J3H2=SUMIFS($C2:$G2,$B2:$F2,SUBSTITUTE(H$1,"TOTAL ",""))
 
Upvote 1
Thank you all for your assistance, each one worked but I ended up using the most simplistic formula.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,004
Members
449,203
Latest member
Daymo66

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