+ Reply to Thread
Results 1 to 3 of 3

Thread: sumIfs statement, with wildcard?

  1. #1
    Registered User
    Join Date
    03-23-2005
    Posts
    2

    sumIfs statement, with wildcard?

    I really hope I can present my question in a way that makes sense, lol.

    Working on a SUMIFS formula, and one of the conditions is dependent on a drop down the user has access to, at the top.

    I want the user to have the ability to select "all" - and it sum everything. But I don't know how to insert that 'wildcard', if you will, into my formula.

    I highlighted the part of the formula I'm having issues with. Assume the user selects "All" from D2 (dropdown). But "all" isn't a valid entry in Atlantic!H:H.... I'm wanting it to basically NOT filter, based on AtlanticH:H. Does that make sense?

    =SUMIFS(Atlantic!C:C,Atlantic!G:G,"="&B3,Atlantic!M:M,IF(B2="All","<="&999,"<="&B2),Atlantic!H:H,IF(D2="All",Atlantic!H:H,"="&D2))

  2. #2
    Valued Forum Contributor Haseeb A's Avatar
    Join Date
    05-24-2011
    Location
    India | Kwt
    MS-Off Ver
    2007
    Posts
    1,447

    Re: sumIfs statement, with wildcard?

    Hello, Try this;

    =SUMPRODUCT(SUMIFS(Atlantic!C:C,Atlantic!G:G,"="&B3,Atlantic!M:M,IF(B2="All","<=999","<="&B2),Atlantic!H:H,IF(D2="All",{"*","<9E300"},"="&D2)))
    HTH; Haseeb

    If your problem is solved, please say so clearly, and mark your thread as Solved:
    Forum Rules & How to Mark a thread as SOLVED

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,052

    Re: sumIfs statement, with wildcard?

    One way would be to test D2 at the start of the formula and have 2 possible formulas based on that, e.g.

    =IF(D2="All",SUMIFS(Atlantic!C:C,Atlantic!G:G,B3,Atlantic!M:M,"<="&IF(B2="All",999,B2)), SUMIFS(Atlantic!C:C,Atlantic!G:G,B3,Atlantic!M:M,"<="&IF(B2="All",999,B2),Atlantic!H:H,D2))
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0