SUMIF Forumula

msalas0308

New Member
Joined
Sep 30, 2020
Messages
14
Office Version
  1. 365
Platform
  1. Windows
I am having a brain fart. I know this is a simple formula but for some reason, I cannot get it. I have a sheet that has multiple information. I want to be able to do a sumif column "A (Period)" has 2021.01 and column "H (Ops Work Center)" has RVR101MA, RVR102MA, RVR103MA, RVR104MA, then sum column "S (SNAP&Conf Hours)".

(BTW, I am trying to get a weighted average of the Snap&Conf Hours by Ops Work Center and Period.)

PeriodPlant SectionPriorityOps Work CenterHas ConfirmationIn SnapshotSNAP&Conf HoursUnsched HoursSched Hours
2021.01WBK2RVR211ST01
0​
0​
8​
2021.01WBK2RVR298MS01
0​
0​
10​
2021.02WBK2RVR160MM01
0​
0​
4​
2021.02WBK2RVR298MS11
10​
0​
10​
2021.02WBK2RVR211ST11
8​
0​
8​
2021.04WBK2RVR160MM01
0​
0​
4​
2021.05WBK2RVR160MM11
4​
0​
4​
2021.02SRU2RVR211ST11
24​
0​
24​
2021.02SRU2RVR300EL10
0​
0​
0​
2021.02RFY1RVR399IE10
0​
0​
0​
2021.01UK22RVR300EL10
0​
1​
0​
2021.01MNT3RVR230WE10
0​
0​
0​
2021.02MNT3RVR398IE10
0​
0​
0​
2021.01WBK1RVR398IE10
0​
0​
0​
2021.03WWT1RVR300EL01
0​
0​
30​
2021.05WWT3RVR103MA11
24​
0​
24​
2021.01WBK2RVR220LB11
18​
0​
18​
2021.01WBK2RVR250EO11
2​
0​
2​
2021.04RFY1RVR398IE10
0​
0​
0​
2021.01SRU2RVR230WE10
0​
28​
0​
2021.02SRU2RVR230WE10
0​
4​
0​
2021.02SRU2RVR240IC10
0​
2​
0​
2021.02SRU2RVR230WE10
0​
0​
0​
2021.02SRU2RVR204MS10
0​
6​
0​
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Are the "RVR..." an OR situation and where do you want the sum result?
Based on your sample, it looks like they're all 0, no?
 
Upvote 0
I think it's more of a sumproduct. See if this works. I messed with the data a bit.

Book1
ABCHIJSTUVWX
1PeriodPlant SectionPriorityOps Work CenterHas ConfirmationIn SnapshotSNAP&Conf HoursUnsched HoursSched HoursUnique A
22021.01WBK2RVR211ST010082021.01110
32021.01WBK2RVR103MA01100102021.02324
42021.02WBK2RVR160MM010042021.040
52021.02WBK2RVR298MS11100102021.0524
62021.02WBK2RVR211ST118082021.030
72021.04WBK2RVR160MM01004
82021.05WBK2RVR160MM11404
92021.02SRU2RVR101MA1124024
102021.02SRU2RVR300EL10000
112021.02RFY1RVR399IE10000
122021.01UK22RVR102MA1010010
132021.01MNT3RVR230WE10000
142021.02MNT3RVR398IE10000
152021.01WBK1RVR398IE10000
162021.03WWT1RVR300EL010030
172021.05WWT3RVR103MA1124024
182021.01WBK2RVR220LB1118018
192021.01WBK2RVR250EO11202
202021.04RFY1RVR398IE10000
212021.01SRU2RVR230WE100280
222021.02SRU2RVR230WE10040
232021.02SRU2RVR101MA1020020
242021.02SRU2RVR230WE10000
252021.02SRU2RVR104MA1010060
Sheet1
Cell Formulas
RangeFormula
W2:W6W2=UNIQUE(A2:A25)
X2:X6X2=SUMPRODUCT(($S$2:$S$25)*(W2=$A$2:$A$25)*(($H$2:$H$25="RVR101MA")+($H$2:$H$25="RVR102MA")+($H$2:$H$25="RVR103MA")+($H$2:$H$25="RVR104MA")))
Dynamic array formulas.
 
Upvote 0
I am having a brain fart. I know this is a simple formula but for some reason, I cannot get it. I have a sheet that has multiple information. I want to be able to do a sumif column "A (Period)" has 2021.01 and column "H (Ops Work Center)" has RVR101MA, RVR102MA, RVR103MA, RVR104MA, then sum column "S (SNAP&Conf Hours)".

(BTW, I am trying to get a weighted average of the Snap&Conf Hours by Ops Work Center and Period.)

PeriodPlant SectionPriorityOps Work CenterHas ConfirmationIn SnapshotSNAP&Conf HoursUnsched HoursSched Hours
2021.01WBK2RVR211ST01
0​
0​
8​
2021.01WBK2RVR298MS01
0​
0​
10​
2021.02WBK2RVR160MM01
0​
0​
4​
2021.02WBK2RVR298MS11
10​
0​
10​
2021.02WBK2RVR211ST11
8​
0​
8​
2021.04WBK2RVR160MM01
0​
0​
4​
2021.05WBK2RVR160MM11
4​
0​
4​
2021.02SRU2RVR211ST11
24​
0​
24​
2021.02SRU2RVR300EL10
0​
0​
0​
2021.02RFY1RVR399IE10
0​
0​
0​
2021.01UK22RVR300EL10
0​
1​
0​
2021.01MNT3RVR230WE10
0​
0​
0​
2021.02MNT3RVR398IE10
0​
0​
0​
2021.01WBK1RVR398IE10
0​
0​
0​
2021.03WWT1RVR300EL01
0​
0​
30​
2021.05WWT3RVR103MA11
24​
0​
24​
2021.01WBK2RVR220LB11
18​
0​
18​
2021.01WBK2RVR250EO11
2​
0​
2​
2021.04RFY1RVR398IE10
0​
0​
0​
2021.01SRU2RVR230WE10
0​
28​
0​
2021.02SRU2RVR230WE10
0​
4​
0​
2021.02SRU2RVR240IC10
0​
2​
0​
2021.02SRU2RVR230WE10
0​
0​
0​
2021.02SRU2RVR204MS10
0​
6​
0​

You have given two factors Period & Ops Work Center and you want to calculate weighted avg cost ??
 
Upvote 0

Forum statistics

Threads
1,224,810
Messages
6,181,079
Members
453,021
Latest member
Justyna P

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