+ Reply to Thread
Results 1 to 6 of 6

SUMPRODUCT with LEN to sum values in rows matching a specific word

  1. #1
    Registered User
    Join Date
    09-15-2020
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    5

    Question SUMPRODUCT with LEN to sum values in rows matching a specific word

    Hello all,

    I am trying to sum values in a specific row of a table based on whether another column in that table includes a specific word or phrase. I have been trying to use SUMPRODUCT, with LEN and SUBSTITUTE to confirm the presence of the word within the cell.

    To count/confirm the presence of the word within the cell, I've been using the following:
    =LEN(A1)-LEN(SUBSTITUTE(A1),"Twitter","")/LEN("Twitter")

    In the sample data, the value returned in F2 should be $590.

    Grateful for any help! This is the one snag in large tracking document I am working on.

    Cheers
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: SUMPRODUCT with LEN to sum values in rows matching a specific word

    Try with "ISNUMBER(SEARCH..." to identify the existing of criteria:

    =SUMPRODUCT(ISNUMBER(SEARCH("Twitter",Table1[Tactic]))*Table1[Spend])
    Quang PT

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: SUMPRODUCT with LEN to sum values in rows matching a specific word

    Hi All,

    another attempt

    =SUMIF(Table1[Tactic],"*Twitter*",Table1[Spend])

    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    09-15-2020
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    5

    Re: SUMPRODUCT with LEN to sum values in rows matching a specific word

    Quote Originally Posted by bebo021999 View Post
    Try with "ISNUMBER(SEARCH..." to identify the existing of criteria:

    =SUMPRODUCT(ISNUMBER(SEARCH("Twitter",Table1[Tactic]))*Table1[Spend])
    This worked perfectly, and much simpler than the solutions I was trying - thank you for your help!
    Last edited by Keyb0; 09-17-2020 at 12:53 PM.

  5. #5
    Registered User
    Join Date
    09-15-2020
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    5

    Re: SUMPRODUCT with LEN to sum values in rows matching a specific word

    Quote Originally Posted by canapone View Post
    Hi All,

    another attempt

    =SUMIF(Table1[Tactic],"*Twitter*",Table1[Spend])

    Regards
    Unfortunately, this formula isn't able to pick specific words out of a string of text, so doesn't return the correct value. The previous response was able to do it! Thank you for your time and suggestion.

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: SUMPRODUCT with LEN to sum values in rows matching a specific word

    Keyb0,

    happy Bebo solved your problem.

    thanks for sharing your kind feedback.

    Hope to be of some help next time.

+ 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] Search for values, copy matching rows to existing sheet in a specific place?
    By sordosxls in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-12-2016, 06:27 PM
  2. Sum Values in a Table Matching Specific Row and Column Values
    By dubasteins in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-15-2014, 09:06 AM
  3. Replies: 1
    Last Post: 07-24-2013, 05:18 AM
  4. [SOLVED] Matching names to values using SUMPRODUCT
    By levtweeney in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-17-2013, 07:53 AM
  5. [SOLVED] alternative methods to sumproduct for comparing/matching rows
    By intothewild in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-17-2012, 07:59 PM
  6. Replies: 2
    Last Post: 02-06-2012, 05:04 PM
  7. Replies: 4
    Last Post: 06-02-2010, 10:50 AM

Tags for this Thread

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