+ Reply to Thread
Results 1 to 4 of 4

SUMIFS with multiple criteria but only with one constant ARRAY?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2013
    Posts
    20

    SUMIFS with multiple criteria but only with one constant ARRAY?

    Dear all,

    The problem:
    I have a sum(sumifs(..) formula going on in which one of the criteria is based on the outcome of a dropdown box. The dropdownbox is some kind of slicer in the data.
    Now I also wanted to add the option to have all data and not have to chose something from the box. So i make a ARRAY constant with all options, in this way, the formula sums everything up when I chose ALL from drop down.
    Eg:

    Dropdown box:
    Type 1
    Type 2
    Type 3
    ALL TYPES

    I use this formula:

    =SUM(SUMIFS(Data!AA:AA,....multiple other constraints....,Data!AK:AK,IF($F$1="ALL TYPES",Allegrootte,$F$1)))

    F1 is the cell that shows the outcome of my dropdown box on the dashboard page. Column AK on tab DATA inlcudes the type mapping of my data. So when I choose ALL TYPES, the condition will become the array "Allegrootte" which is defined as ={"Type 1","Type 2","Type 3"}.

    So far so good, this thing works perfectly and I can get different charts/data when I pick a type from the dropdown and i can also still get the data for all types summed up.

    Now I want to add anotther dropdown box to slice the data, say geography.

    Region A
    Region B
    Region C
    ALL REGIONS


    Following the same logic I do this:

    =SUM(SUMIFS(Data!AA:AA,....multiple other constraints....,Data!AK:AK,IF($F$1="ALL TYPES",Allegrootte,$F$1),Data!AL:AL,IF($F$1="ALL REGIONS",Alletypes,$F$1)))

    Where Alletypes is defined as ={"Region A","Region B","Region C"}

    Now the formula stops working and I get 0 as result for all my data.

    Is this a limitation of excel or is there something else playing? (ps. I am using the Ctrl+Shift+ENTER)

    Thank you in advance for you help and time.

    Kind regards
    Thijs

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMIFS with multiple criteria but only with one constant ARRAY?

    Hi,

    If two sets of "OR" criteria are being used within COUNTIF(S)/SUMIF(S) then, in order to obtain a count which comprises all possible combinations of those criteria, the two arrays being passed for the criteria need to be orthogonal. Hence, if you have defined Allegrootte as:

    ={"Type 1","Type 2","Type 3"}

    which represents a row-vector, then Alletypes should be a column-vector, i.e.:

    ={"Region A";"Region B";"Region C"}

    Since you list "Belgium" on your profile, it's possible that the separators in array constants differ for your version of Excel, which you will need to check. In Italian versions of Excel (post-2007), for example, the separator in row-vectors is a backslash, e.g.:

    ={"Type 1"\"Type 2"\"Type 3"}

    and in column-vectors a period, e.g.:

    ={"Region A"."Region B"."Region C"}

    though I cannot say whether this also applies to Belgian versions of Excel.

    See here for an explanation if you wish:

    https://excelxor.com/2014/09/28/coun...iteria_ranges/

    Note also that you cannot go beyond two sets of OR criteria using COUNTIFS (for reasons explained in that post); a switch to SUMPRODUCT is necessary in such cases.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    03-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2013
    Posts
    20

    Re: SUMIFS with multiple criteria but only with one constant ARRAY?

    Thank you XOR, it's logic when you see the explanation

    I might need to use the sumproduct in the future, so thanks for the tip.

    KR,
    Thijs

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMIFS with multiple criteria but only with one constant ARRAY?

    You're welcome!

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] SUMIFS with array criteria
    By TrondG in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-04-2016, 08:43 AM
  2. Using an element of an array as criteria for SumIfs
    By austincg1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2015, 11:09 AM
  3. [SOLVED] SUMIFS/COUNTIFS array function question (multiple criteria)
    By akamenov88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2015, 07:08 PM
  4. SUMIFS with Array Constant Fails
    By zCJH4254 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-20-2014, 11:08 AM
  5. [SOLVED] SUMIFS with multiple criteria evaluated against array?
    By opheim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-07-2013, 09:03 AM
  6. [SOLVED] SUMIFS to match array of Criteria
    By amazinglazers in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-19-2013, 06:25 AM
  7. Help using a list/array as criteria in SUM(SUMIFS())
    By jaredmason in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2012, 08:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1