Sumif with multiple criteria in one column using named ranges

Wgijbels

New Member
Joined
Nov 17, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi everbody

I am trying to use the SUMIFS-function for multiple criteria in one column where my criterias are 'named ranges' within this column.
Is there any possibility to do this?
Excel does not seem to accept named ranges as a criteria, f.e.:

=SUM(SUMIFS('Mapping GVV'!D:D;'Mapping GVV'!C:C;{Rent,Rentaldiscount;Rentfree}))

where Rent, Rentaldiscount and Rent free are named ranges within the criteria column.

Thank you very much in advance for any help.

Kind regards

W.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
You can only enter numbers or text strings in array constants, not references to ranges (whether named or not) or other functions.

You could try (untested)
Excel Formula:
=SUM(SUMIFS('Mapping GVV'!D:D;'Mapping GVV'!C:C;CHOOSE({1\2\3};Rent;Rentaldiscount;Rentfree)))
Which I believe should work if the named ranges are single cells. It might work with larger ranges but I can't say for sure without testing it first.
 
Upvote 0
There is still something I don't understand.

If I use the function below:

1605619507743.png


and afterwards change the value of my named range 'Recuperatieverzekeringspremies' (from zero to 2).

1605619578800.png


Excel doubles the value (so +4).

1605619616375.png


Do you have any idea why this is?

Thank you again!
 
Upvote 0
It's because your ranges are not the same size, if you use the evaluate formula button on the ribbon & step through the calculation you will see what happens.
How about
+Fluff v2.xlsm
ABCD
1
2
3a3622
4b2842
5d-3622
6d-2842
7c2
86466
Main
Cell Formulas
RangeFormula
A8A8=SUM(FILTER(D3:D7,(COUNTIF(test1,C3:C7))+(COUNTIF(test2,C3:C7))))
Named Ranges
NameRefers ToCells
test1=Main!$C$3:$C$4A8
test2=Main!$C$7A8
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,603
Members
449,089
Latest member
Motoracer88

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