+ Reply to Thread
Results 1 to 6 of 6

wildcard in sumif(s) or sumproduct

  1. #1
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    376

    wildcard in sumif(s) or sumproduct

    Wildcard in sumproduct.xlsx

    I'm wondering if I do a sumif(s) or sumproduct like in the attached, can I enter something in cell H2 that will act as a wildcard for returning all of the possible data selections in Cat A (Col A).

    E.g. Column A has yes/no entries and you want to be able to sum all the yes's, all the no's and all of them regardless of yes/no.

    Wondering if there a symbol like a * which tells the formula to include all the results?

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: wildcard in sumif(s) or sumproduct

    Try

    =SUMPRODUCT(((Table_Data[Cat A]=H2)+(H2="")>0)*(Table_Data[Cat B]=H3)*(INDEX(Table_Data,,MATCH(H4,Table_Data[#Headers],0))))

  3. #3
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    376

    Re: wildcard in sumif(s) or sumproduct

    That works
    what's the logic there for understanding please

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: wildcard in sumif(s) or sumproduct

    It's basically an OR

    ((Table_Data[Cat A]=H2)+(H2="")>0)*

    There's 2 criteria
    Is Cat A = H2 ?
    Is H2 "" ?

    Each with a True or False answer.
    True = 1, False = 0
    So the result of each is added, and that sum could be either 0 1 or 2

    Then the >0 tests if that result is greater than 0 (1 or 2)
    So the >0 part can only be TRUE if Either or Both of the criteria are TRUE.
    It will be False if both criteria are false.

  5. #5
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    376

    Re: wildcard in sumif(s) or sumproduct

    Brill cheers for the help

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: wildcard in sumif(s) or sumproduct

    You're welcome.

+ 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] sumproduct wildcard
    By L902949 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2014, 04:46 PM
  2. [SOLVED] SumProduct w/WildCard
    By briank in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-24-2006, 07:25 PM
  3. SUMPRODUCT with Wildcard
    By Jason Morin in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 09-06-2005, 04:05 AM
  4. SUMPRODUCT with Wildcard
    By JerryS in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. [SOLVED] SUMPRODUCT with Wildcard
    By JerryS in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 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