Sumif?

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
What formula do I use to have Excel look at 4 columns (D,E,F,G), the first three (D,E,F) are material size, the fourth (G) is the total of the parts for the material size. I figured it'd be SUMIF, but I can't figure out how to link the first three cells without using TEXTJOIN and creating a list of every possible size. I'd like it to group the results so I'll know what sizes there are and how many sheets are of each size.
Thanks for your help.
[TABLE="width: 129"]
<tbody>[TR]
[TD="colspan: 3"]SHEET SIZE[/TD]
[TD]#
SHEETS
[/TD]
[/TR]
[TR]
[TD]108[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]67[/TD]
[/TR]
[TR]
[TD]138[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]108[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]102[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]108[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]138[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD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]
[TR]
[TD]108[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]108[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]90[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]84[/TD]
[TD]x[/TD]
[TD]48[/TD]
[TD]1[/TD]
[/TR]
</tbody><colgroup><col><col><col><col></colgroup>[/TABLE]
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
First, if every cell in E is an x, then we can simply ignore it because it's irrelevant.

Try SUMIFS

=SUMIFS(G:G,D:D,108,F:F,48)

That will sum G for all 108 x 48


If the x in E is NOT something we can take for granted, then we can just add another criteria for it
=SUMIFS(G:G,D:D,108,E:E,"x",F:F,48)
 
Upvote 0
Hi,

The following is also ignoring the x in column E as explained by Jonmo:


Book1
DEFGH
1SHEET SIZE#
2SHEETSTotal
3108x4875246
4102x4824106
5102x4867
6138x482030
7102x485
8108x485
9102x4810
10108x4810
11138x4810
1284x48113
1384x481
1484x481
1584x481
1690x4814
1784x481
18132x4836
19108x486
20144x4824
21132x483
22144x482
2396x48612
2490x481
2566x4811
2684x481
2796x481
2896x481
2990x481
3096x481
3196x481
3284x482
3396x482
3472x4833
35108x4875
36108x4875
3784x481
3884x481
3984x481
4084x481
4190x481
4284x481
Sheet44
Cell Formulas
RangeFormula
H3=IF(COUNTIFS(D$3:D3,D3,F$3:F3,F3)=1,SUMIFS(G$3:G$42,D$3:D$42,D3,F$3:F$42,F3),"")


H3 formula copied down as required, then use Filter to hide Blanks to show this (you can also hide column G):


Book1
DEFGH
1SHEET SIZE#
2SHEETSTotal
3108x4875246
4102x4824106
6138x482030
1284x48113
1690x4814
18132x4836
20144x4824
2396x48612
2566x4811
3472x4833
Sheet44
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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