+ Reply to Thread
Results 1 to 18 of 18

SUMIF with cells that contain a PORTION of text conditions

  1. #1
    Registered User
    Join Date
    03-17-2008
    Posts
    12

    SUMIF with cells that contain a PORTION of text conditions

    Hello, Excel Experts:

    I need to sum up the total software count by first finding portions of software titles within a column of titles that do not follow conventional standardized titles.

    In the example below: I need to have Excel search for all of the cells in column D that contain the text "acrobat" AND "pro" AND "8", then sum up the count # (in column E) of the appropriate cells found.
    Attached Images Attached Images

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    SUMIF with cells that contain a PORTION of text conditions

    Try this:

    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    03-17-2008
    Posts
    12

    Thumbs up That's It!!!!!

    RON!!!

    I am in awe of your Excel Mastery!!! I have tried variations of sumif for TWO days and only NOW, thanks to you, do I have the solution!

    You are AWESOME!!!! THANKS AGAIN!!!!

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    You're very welcome

    Thanks so much for the kind words...I'm glad I could help

  5. #5
    Registered User
    Join Date
    03-17-2008
    Posts
    12

    Part Two

    Thanks again to Ron for the previous help! I have one additional question with regard to the same formula:

    What would I add if I wanted to exclude certain text within the search?

    Rod

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    SUMIF with cells that contain a PORTION of text conditions

    I'm guessing you want to match items that contain certain text
    BUT *do not* contain other text.

    Example:
    Starts with "acrobat"
    Then contains "pro"
    Then contains an 8
    BUT
    Does NOT contain "mac"

    If that's true, you'll need a different kind of formula.
    Try something like this (in sections for readabilty):
    Please Login or Register  to view this content.
    Does that help?

  7. #7
    Registered User
    Join Date
    03-17-2008
    Posts
    12

    Again, I Bow to your EXCELLENCE!

    That did it, Ron!!!

    Thanks again!!! I am DEFINITELY glad that I found this forum!

    Rod

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Glad to help

    Welcome to the forum.

    and I gotta tell you..
    It's enthusiasm and appreciation like yours that makes answering questions here so rewarding.

  9. #9
    Registered User
    Join Date
    10-16-2007
    Posts
    5

    Re: Glad to help

    I have a similar question to this one. I would like to know if I can do a sumif formula which will sum all lines which contain a text string which is in another cell.
    For example, I have a list of different SKUs of particular brands. There are 5 brands in total. I would like to sum the sales of each particular brand by refering to the brand name which will sit in column A. I'm trying avoid having to type in the brand's name for each instance, and also make it easier should I need to add another brand's set of SKUs.

    This is what I have now:
    =SUMIF($A$6:$A$325,"Alpine*",O$6:O$325)

    Would like to instead refer to a cell which has Alpine in it to make it faster and easier to make changes to the table.

    Hope this makes sense...
    Thanks in advance.

  10. #10
    Registered User
    Join Date
    10-16-2007
    Posts
    5

    Re: Glad to help

    Quote Originally Posted by dbrunner281 View Post
    I have a similar question to this one. I would like to know if I can do a sumif formula which will sum all lines which contain a text string which is in another cell.
    For example, I have a list of different SKUs of particular brands. There are 5 brands in total. I would like to sum the sales of each particular brand by refering to the brand name which will sit in column A. I'm trying avoid having to type in the brand's name for each instance, and also make it easier should I need to add another brand's set of SKUs.

    This is what I have now:
    =SUMIF($A$6:$A$325,"Alpine*",O$6:O$325)

    Would like to instead refer to a cell which has Alpine in it to make it faster and easier to make changes to the table.

    Hope this makes sense...
    Thanks in advance.
    Never mind! Just figured it out two seconds after I posted this. Here is the solution. Use:
    =SUMIF($A$6:$A$325,A327&"*",O$6:O$325)
    A327 is the the cell containing "Alpine"

  11. #11
    Registered User
    Join Date
    07-26-2012
    Location
    US Military/Germany
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: SUMIF with cells that contain a PORTION of text conditions

    Quote Originally Posted by Ron Coderre View Post
    Try this:

    Please Login or Register  to view this content.
    Is that something you can work with?


    Found this after searching for what I needed. Did NOT think to use wildcard * in the formula. thank you very much.

  12. #12
    Registered User
    Join Date
    11-12-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: SUMIF with cells that contain a PORTION of text conditions

    Hello, I am attempting something similar to the original post, but am not having any luck. I want to use a sumif looking for text in isolation.

    For example:
    Beats on a drum - YES
    Beatson a drum - NO
    On a drum she beats - YES

    I want to count all the instances where "beats" occurs in isolation, NOT as part of another word. All my wildcard combinations have not yiedled the results I am looking for.

    Thanks in advanced!!

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: SUMIF with cells that contain a PORTION of text conditions

    pipsberg,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  14. #14
    Registered User
    Join Date
    01-24-2013
    Location
    Macau, China
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: SUMIF with cells that contain a PORTION of text conditions

    Hi Ron. I'm just wondering why there are *'s among pro and 8 but not acrobat? What does that * do?
    Last edited by imhughmak; 01-24-2013 at 05:06 AM. Reason: typo

  15. #15
    Registered User
    Join Date
    10-29-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    1

    Re: SUMIF with cells that contain a PORTION of text conditions

    Quote Originally Posted by Ron Coderre View Post
    Try this:

    Please Login or Register  to view this content.
    Is that something you can work with?
    Please help. You obviously know your stuff with Excel. I have a formula similar to the one above.



    Please Login or Register  to view this content.
    column A contains lastname, firstname
    Column B contains batting averages

    The goal is to sum only where the last names are Chavez, Feliz, Gonzalez or Ogando. My Code above works but I don't understand why I have to encase the sumif(..) in sum ie =sum(sumif()). this code does not work with just sumif. If anyone can shed some light on this it would be much appreciated.

    Thanks
    Michael

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

    Re: SUMIF with cells that contain a PORTION of text conditions

    Moderators...

    Is it OK to answer this question?

    It's kind of stupid that I should have to ask permission to answer a question, don't'cha think?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  17. #17
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: SUMIF with cells that contain a PORTION of text conditions

    SUMIF(A:A,{"*Chavez*","Feliz*","Gonzalez*","Ogando*"},B:B) part just produce the sequence of Column B, for example

    A B
    Chavez 10
    Feliz 20
    Gonzalez 30
    Ogando 40

    SUMIF(A:A,{"*Chavez*","Feliz*","Gonzalez*","Ogando*"},B:B) ,just produce {10;20;30;40} , you must encase with SUM Function.

    or you change the code with individual formula like this :

    =SUMIF(A:A,"*Chavez*",B:B)+SUMIF(A:A,"Feliz*",B:B)+ and so on........ the result will be the same but not elegant I guess.

    Azumi

  18. #18
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: SUMIF with cells that contain a PORTION of text conditions

    Tony,

    You can proceed, though i feel Azumi has already answered it.

+ 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.6.0 RC 1