+ Reply to Thread
Results 1 to 2 of 2

sumproduct formula to count keyword in cells for a given month

  1. #1
    Registered User
    Join Date
    01-12-2011
    Location
    Yeovil, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    sumproduct formula to count keyword in cells for a given month

    =SUMPRODUCT(--(MONTH('Short Term Issues'!$A$2:$A$100)=11),--(YEAR('Short Term Issues'!$A$2:$A$100)=2010),--('Short Term Issues'!$D$2:$D$100="Leaking"))

    Im using the above formula to count rows which have the information 'Leaking' contained in column D:D where the date raised in column A:A is within a certain month, in this case 'Nov2010' - Ill be duplicating the formula for subsequent months, and differant key words in other cells

    My problem is that this formula only counts cells which are an exact match of the keyword. Can this be modified so that it counts cells where other words are present along with the keyword?? I have tried using a wildcard type function but iv been unsuccessful so far.

    Any helps is appreciated, Thanks
    Last edited by philllipoosis; 01-13-2011 at 10:52 AM. Reason: moderator instructions

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sumproduct formula to count keyword in cells for a given month

    Quote Originally Posted by phillipoosis
    counts cells where other words are present along with the keyword??
    You can embed SEARCH or FIND into your SUMPRODUCT, eg:

    Please Login or Register  to view this content.
    Quote Originally Posted by phillipoosis
    Ill be duplicating the formula for subsequent months, and differant key words in other cells
    However, given the above I would say you'll be better off looking for alternate methods to SUMPRODUCT - it is not an efficient formula and should be used in moderation.

    We could for ex. create a key on 'Short Term Issues' sheet, suppose column F is free:

    Please Login or Register  to view this content.
    We can then dispense with the SUMPRODUCT altogether and revert to the much more efficient COUNTIF approach

    Please Login or Register  to view this content.
    In XL2007 and above we could use COUNTIFS to negate need for helper calcs - in versions prior to that the above technique is useful if you want to maintain a good level of calculation performance.

+ 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