SUMIFS Wildcard

powelly

New Member
Joined
Apr 20, 2018
Messages
8
Hi Guys,

I'm using Excel 2016 and trying to retrieve some values from a table, here's a simple example;

[TABLE="width: 192"]
<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]Dept[/TD]
[TD="width: 64"]Sub Dept[/TD]
[TD="width: 64"]Sales[/TD]
[/TR]
[TR]
[TD]Dept A[/TD]
[TD]Dept A1[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]Dept A[/TD]
[TD]Dept A2[/TD]
[TD="align: right"]150[/TD]
[/TR]
[TR]
[TD]Dept B[/TD]
[TD]Dept B1[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Dept B[/TD]
[TD]Dept B2[/TD]
[TD="align: right"]250[/TD]
[/TR]
[TR]
[TD]Dept B[/TD]
[TD]Dept B3[/TD]
[TD="align: right"]150[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Inputs[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dept[/TD]
[TD]Dept A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sub Dept[/TD]
[TD]Dept A1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Output[/TD]
[TD="align: right"]100[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Where the formula in the output is "=SUMIFS( G8:G12, E8:E12, F15, F8:F12, F16 )"

What I'm looking for is the ability to sum up either all Depts or Sub Depts, I thought I could use wildcards in the inp[ut cells for this but it doesn't seem to work. Can anyone help?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Your formula works if you insert an asterisk (*) in either B9 or B10 or in both.

M.

Right. But I want to keep the formula fixed and then input either wildcards (for all depts) or a department name (for a single dept). Obviously my actual data and output criteria is much larger than this example.
 
Upvote 0
Right. But I want to keep the formula fixed and then input either wildcards (for all depts) or a department name (for a single dept). Obviously my actual data and output criteria is much larger than this example.

I understand, but as i said you can keep up the formula as it is and insert the wildcards (*) as needed.

M.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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