+ Reply to Thread
Results 1 to 4 of 4

Sumproduct within the same column

  1. #1
    Registered User
    Join Date
    04-08-2005
    Posts
    3

    Question Sumproduct within the same column

    I am trying to search through a string for specific words and if both words match then have it count. It would work best if COUNTIF could handle multiple conditions but at the moment I am trying to use SUMPRODUCT. The problem is is that I am not sure if one can use SUMPRODUCT with both arrays being the same column. This is what I have so far and it does't seem to work.

    =SUMPRODUCT(--(G2:G300="*WebCT*"),--(G2:G300="*quiz*"))

    For it to count, both WebCT and quiz must be found in the string.
    I have also tried it without the -- and using * instead of , but with the same results (nothing )

    Also, is there a way to ignore the case-sensitive search?

    Thanks for any help.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Try one of these:

    =COUNTIF(G2:G300,("*WebCt*"))+COUNTIF(G2:G300,("*Quiz*"))

    to count cells with *either* WebCt OR Quiz in them

    --OR--

    =COUNTIF(G2:G300,("*WebCt*Quiz*"))+COUNTIF(G2:G300,("*Quiz*WebCt*"))

    to count only cells with BOTH WebCt and Quiz in them


    HTH

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Registered User
    Join Date
    04-08-2005
    Posts
    3
    Works like a charm! Thanks very much.


    Colton

    ___________

    "Kids, you tried your best and you failed miserably. The lesson is, never try."

  4. #4
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Mr. Cello... Glad it worked for you. Thanks for the feedback!

    Cheers

    Bruce

+ 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