+ Reply to Thread
Results 1 to 5 of 5

Sum based on certain text within a cell

  1. #1
    Forum Contributor
    Join Date
    04-06-2017
    Location
    Wolverhampton
    MS-Off Ver
    Office 365
    Posts
    471

    Sum based on certain text within a cell

    Hello

    I need a formula that will sum and return based on specific characters…
    D39 = Looks at C21 TO C326 specifically looking for (EAT)… and then sums Colum d up

    I have entered expected results


    Paul

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Sum based on certain text within a cell

    Hi,

    =SUM(IF(LEN(C21:C326)<>LEN(SUBSTITUTE(C21:C326,"EAT","")),D21:D326,0))

    or

    =SUM(IF(ISNUMBER(FIND("EAT",C21:C326)),D21:D326,0))

    Commit using Ctrl+Shift+Enter
    Last edited by NeedForExcel; 01-29-2020 at 05:12 AM.
    Cheers!
    Deep Dave

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Sum based on certain text within a cell

    seems overcomplicated unless Ive got it wrong!

    sumif(c21:c326,"EAT",d21:d326)


    or perhaps
    sumif(c21:c326,"*EAT*",d21:d326)

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Sum based on certain text within a cell

    Quote Originally Posted by davsth View Post
    seems overcomplicated unless Ive got it wrong!
    I guess I got it wrong.. I though EAT might be a substring of a bigger text string.. Its not mentioned anywhere in the OP, but not sure why I thought that..

  5. #5
    Forum Contributor
    Join Date
    04-06-2017
    Location
    Wolverhampton
    MS-Off Ver
    Office 365
    Posts
    471

    Re: Sum based on certain text within a cell

    thanks for your time,


    @ Deep Dave (perfect)

+ 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. Want to copy text from one cell to another cell based on another cells text
    By eri2017 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-24-2017, 01:17 PM
  2. [SOLVED] Possible to change text in another cell based on text that is entered in another cell?
    By rhett7660 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2017, 12:11 PM
  3. Color Cell Based on Specific Text in Other Cell and Sorting Based on Results
    By kre30a in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2016, 07:51 PM
  4. [SOLVED] Change cell text based on text (from drop-down) in another cell
    By mintymike in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2015, 10:48 AM
  5. [SOLVED] How to have a cell auto-generate text based on text from another cell?
    By wgilles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-30-2015, 02:46 PM
  6. [SOLVED] Adding text to a cell based on specific text characters in another cell
    By JohnnyBoyxxx in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-29-2014, 06:03 PM
  7. Replies: 2
    Last Post: 11-29-2012, 11:27 AM

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