+ Reply to Thread
Results 1 to 8 of 8

Combo Sumproduct

Hybrid View

  1. #1
    Registered User
    Join Date
    10-29-2004
    Posts
    37

    Combo Sumproduct

    Hey all,

    This shouldn't be too difficult but I'm running out of time to figure this out.

    Here is the current equation I have:

    The idea is too add up the number of occurrences of "tuff" and "rouge" occurrences in column D that actually has a something in the F column. However, the tuff and rouge are the first word followed by numbers, such as Tuff23 or Rouge45. The wildcard number doesn't mean anything...just the first word. For example, in cell D9 "Tuff33" is displayed and a character is in cell F9. This will count as 1. If F9 was blank, then the result would still be zero.

    =SUMPRODUCT((ISNUMBER(FIND("TUFF",$D$9:$D$50)))*($F$9:$F$50<>""))+SUMPRODUCT((ISNUMBER(FIND("ROUGE",$D$9:$D$50)))*($F$9:$F$50<>""))

    I have two questions regarding this equation.

    1. I would like to combine these two functions into one. I tried to use the AND with the FIND function but didn't work right...the way I did it tho.

    2. Here is the main issue with this equation. The text MUST BE capital letters. What if Tuff21 was entered? It doesn't count it...it will only count if it is entered as TUFF21. How can I get it to work regardless of case?

    I greatly appreciate your help with this.

    DrV

  2. #2
    Registered User
    Join Date
    10-29-2004
    Posts
    37
    I found one of my answers. Change the FIND function with SEARCH function. Now, I would like to combine them...any ideas. Thanks.

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

    Combo Sumproduct

    Perhaps this:

    If the text must start with TUFF or ROUGE :
    =SUMPRODUCT(ISNUMBER(FIND({"TUFF","ROUGE"},LEFT($D$9:$D$50,{4,5})))*($F$9:$F$50<>""))
    Note: the formula you posted counted TUFF and ROUGE cells if those words occurred anywhere in the cell.

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    =SUMPRODUCT((LEFT(d9:d50,{4,5})={"TUFF","Rouge"})*(f9:f50<>""))


    Regards

    Dav

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

    Combo Sumproduct

    Sorry, I think I misinterpreted your 2nd comment.....
    You actually DON'T want the search to be case-sensitive.

    I thinks Dav's formula is what you need.

  6. #6
    Registered User
    Join Date
    10-29-2004
    Posts
    37
    Got it...thanks so much all for your help.

  7. #7
    Registered User
    Join Date
    10-29-2004
    Posts
    37
    Needed to bump this up for some more help. Below is the formula I've used; however, I need to do this for multiple sheets instead just one sheet.

    =SUMPRODUCT((ISNUMBER(SEARCH({"Tuff","Rogue"},October!$D$9:$D$111)))*(October!$F$9:$F$111<>""))

    I was able to add up all the occurrences of Tuff and Rogue while something is entered in the F column. However, I could add other sheets? I figured I need to put {October, November, December} statement somewhere but not sure. All the cells are the same; however, just need to add several more sheets (months). Greatly appreciate your expertise...you have all helped me greatly over the past 2 yrs with projects that have come my way. Thanks.

    DrV

  8. #8
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211
    Quote Originally Posted by drvortex
    Hey all,

    This shouldn't be too difficult but I'm running out of time to figure this out.

    Here is the current equation I have:

    The idea is too add up the number of occurrences of "tuff" and "rouge" occurrences in column D that actually has a something in the F column. However, the tuff and rouge are the first word followed by numbers, such as Tuff23 or Rouge45. The wildcard number doesn't mean anything...just the first word. For example, in cell D9 "Tuff33" is displayed and a character is in cell F9. This will count as 1. If F9 was blank, then the result would still be zero.

    =SUMPRODUCT((ISNUMBER(FIND("TUFF",$D$9:$D$50)))*($F$9:$F$50<>""))+SUMPRODUCT((ISNUMBER(FIND("ROUGE",$D$9:$D$50)))*($F$9:$F$50<>""))

    I have two questions regarding this equation.

    1. I would like to combine these two functions into one. I tried to use the AND with the FIND function but didn't work right...the way I did it tho.

    2. Here is the main issue with this equation. The text MUST BE capital letters. What if Tuff21 was entered? It doesn't count it...it will only count if it is entered as TUFF21. How can I get it to work regardless of case?

    I greatly appreciate your help with this.

    DrV
    =SUMPRODUCT((ISNUMBER(SEARCH({"Tuff","Rouge"},D9:D50)))*(F9:F50<>""))
    or
    =SUMPRODUCT((LEFT(D9:D50,4)="Tuff")+(LEFT(D9:D50,5)="Rouge")*(F9:F50<>""))

+ 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