Sumifs with any one or more of multiple criteria

Funktion

New Member
Joined
Mar 25, 2016
Messages
31
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi, I'm using Microsoft Office 365 on a managed, Windows-based machine.

I have a dataset (A6:I25) with seven fields, one per column in columns A through H, making up an account number. Not all account numbers contain all seven fields. There are charges in column I for each distinct account number combination. At the top (in row 3), I have an entry section where I can enter in any of the criteria found within the account numbers. I would like to be able to get a sum if I enter just one, or two, or any number of those criterium. I don't want it to look for a match to those blank cells in the dataset. But rather, I want it to ignore that field and return results for only the field(s) entered.

I've asked a somewhat similar question before and the solution to that, which was adding &"" to the end of some of the cell references, doesn't seem to be working here. The formula I'm trying is:
=SUMIFS(I7:I25,A7:A25,A3&"",B7:B25,B3&"",C7:C25,C3&"",D7:D25,D3&"",E7:E25,E3&"",F7:F25,F3&"",G7:G25,G3&"",H7:H25,H3&"")

I'm uploading an image of a sample dummy dataset with some color coding to group the distinct account number combinations. Pay particular attention to the bottom three sample on the right side of the sheet.
 
You didn't show what you tried!

You could try the following
- make the data a Table
- try the formula
- only 702 selected for Sub-project the sum shows

or
try formulas with Filter

Sumifs.xlsm
ABCDEFGHI
5Dataset20,990.00
6Acct. TypeFundDept.ProgramAccount CodeAreaProjectSub-projectCharge
10E1321825135699153143325715702880
11E13218251356280631433262687024000
12E13218251356280631433262687024000
15E13218251356280631433257157022000
16E13218251356280631433257157022000
17E13218251356280631433257157022000
18E13218251356280631433257157022000
19E13218251356280631433262687022000
20E13218251356280631433262687022000
21E1321825135699153143325715702110
6e
Cell Formulas
RangeFormula
I5I5=SUBTOTAL(109,Table4[Charge])
 
Last edited:
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Sumifs.xlsm
ABCDEFGHI
4
5Dataset13,909.80
6Acct. TypeFundDept.ProgramAccount CodeAreaProjectSub-projectCharge
8E1121825218405628063143324000
9E1121825218405628063143324000
13E1121825218405628063143322000
14E1121825218405628063143322000
22E11218251543259314332720
23E11218251543259314332720
24E11218251543259314332412.2
25E1121825154325931433257.6
26
6e
Cell Formulas
RangeFormula
I5I5=SUBTOTAL(109,Table4[Charge])
 
Upvote 0
With just 702 selected in Drop-Down for Sub_Project or by Sumifs

Sumifs.xlsm
ABCDEFGHI
5Dataset20,990.00
6Acct. TypeFundDept.ProgramAccount CodeAreaProjectSub-projectCharge
10E1321825135699153143325715702880.00
11E13218251356280631433262687024,000.00
12E13218251356280631433262687024,000.00
15E13218251356280631433257157022,000.00
16E13218251356280631433257157022,000.00
17E13218251356280631433257157022,000.00
18E13218251356280631433257157022,000.00
19E13218251356280631433262687022,000.00
20E13218251356280631433262687022,000.00
21E1321825135699153143325715702110.00
26
2720,990.00702
28
6e
Cell Formulas
RangeFormula
I5I5=SUBTOTAL(109,Table4[Charge])
G27G27=SUMIFS(Table4[Charge],Table4[Sub-project],H27)
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

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