+ Reply to Thread
Results 1 to 7 of 7

how to fins sub strings with SUMPRODUCT?

  1. #1
    Registered User
    Join Date
    08-07-2015
    Location
    London, UK
    MS-Off Ver
    2013
    Posts
    2

    how to fins sub strings with SUMPRODUCT?

    Getting irritated that hacks that work with some formulas won't work with others.

    case in point:
    I can use "*"&A1&"*" to find a substring with SUMIFS, but not SUMPRODUCT.

    with SUMPRODUCT:
    this works: SUMPRODUCT(($B$4:$B$15=G15)*($C$3:$E$3=G16)*(C4:E15>0))
    but not this: SUMPRODUCT(($B$4:$B$15="*"&G15&"*")*($C$3:$E$3=G16)*(C4:E15>0))

    Please help if you can!

    Thank you!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: how to fins sub strings with SUMPRODUCT?

    Maybe this...

    =SUMPRODUCT(ISNUMBER(SEARCH(G15,$B$4:$B$15))*($C$3:$E$3=G16)*(C4:E15>0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: how to fins sub strings with SUMPRODUCT?

    Try

    =SUMPRODUCT((ISNUMBER(SEARCH(G15,$B$4:$B$15))*($C$3:$E$3=G16)*(C4:E15>0)))

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: how to fins sub strings with SUMPRODUCT?

    You can do it like this:

    =SUMPRODUCT((ISNUMBER(SEARCH(G15,$B$4:$B$15)))*($C$3:$E$3=G16)*(C4:E15>0))

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    08-07-2015
    Location
    London, UK
    MS-Off Ver
    2013
    Posts
    2

    Re: how to fins sub strings with SUMPRODUCT?

    Thank you so much all!

    I've tried all three - JohnTopley's works! Tony and Pete's close, just a matter of embedding.

    Thank you again!!!

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: how to fins sub strings with SUMPRODUCT?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: how to fins sub strings with SUMPRODUCT?

    Quote Originally Posted by HolmesM View Post
    I've tried all three - JohnTopley's works! Tony and Pete's close, just a matter of embedding.
    Hmmm...

    I get the same results from all 3 formulas.

+ 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. Sumproduct of 2 columns, if one of 7 strings found in corresponding rows
    By lennartvl in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-28-2015, 10:09 AM
  2. SUMPRODUCT Exclude Numbers and Text Strings
    By tyeinse in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-19-2014, 05:20 AM
  3. find for a value and append the value in master sheet
    By Sindhuja in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2012, 01:47 AM
  4. SUMPRODUCT using OR with two or more text strings
    By bkatzman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-31-2010, 04:54 PM
  5. Is using RIGHt function best to fins values?
    By skatmandu2002 in forum Excel General
    Replies: 3
    Last Post: 05-25-2008, 06:56 AM
  6. Reading in Number Strings with Dashes in SUMPRODUCT
    By rackun in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-23-2008, 01:50 AM
  7. Sumproduct and finding partial strings
    By Jeff in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-06-2005, 01:06 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