+ Reply to Thread
Results 1 to 7 of 7

Countif the text in a cell, not text in a formula - Help!

  1. #1
    Registered User
    Join Date
    05-25-2022
    Location
    London
    MS-Off Ver
    Google Sheets
    Posts
    16

    Question Countif the text in a cell, not text in a formula - Help!

    Hey all.

    Having a little difficulty with this one.

    Essentially, I am trying to create a formula that counts the number of emails in a list that have a certain subject title between two dates, but crucially DOES NOT count them if there are certain words/strings in the subject like 'automatic reply'.

    My formula works thus far. It counts the subject title occurrences with variations from the cell (G7 in pic) and then it doesn't count the other words that are in the rest of the formula.

    I want to tidy the formula up so that so that I can simply drag it down, like the formula for cell value in G7. When I try to add <> in the same format, to not count the 'negative replies' from B7 down it doesn't let me do it. Can anyone let me know what might work here please?

    Like I said I want the whole formula drag-able down. There is a file attached.

    =COUNTIFS('Email Replies (add to end)'!$C$2:$C,""&Text($G7,"0")&"*",'Email Replies (add to end)'!$C$2:$C,"<>*Automatic reply*",'Email Replies (add to end)'!$C$2:$C,"<>*Request received*", 'Email Replies (add to end)'!$C$2:$C,"<>*Ticket*", 'Email Replies (add to end)'!$C$2:$C,"<>*automatische Antwort*", 'Email Replies (add to end)'!$C$2:$C,"<>*Spam*", 'Email Replies (add to end)'!$C$2:$C,"<>*Commercial*",'Email Replies (add to end)'!$D$2:$D,">"&I7,'Email Replies (add to end)'!$D$2:$D,"<="&K7)

    ThanksScreenshot 2022-07-20 at 11.52.54.png
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Countif the text in a cell, not text in a formula - Help!

    can you explain again, clearly...

    where are the "two dates" that you are looking between?
    where do you want the formula?
    what should and should not be included in the count?

    to facilitate the making of a Google Sheets formula, i have created this file.

    https://docs.google.com/spreadsheets...#gid=802716170

    you can add/edit to it however you need.

    NOTE:
    since your post count is now more than 10, you should have the ability to post links to google sheets documents. i suggest you share file links so that those who help you are not expected to download a file, then re-upload and convert it to a google sheet so they can then create a google sheets formula for your pleasure... in other words.. help us to help you!
    Last edited by janmorris; 07-20-2022 at 07:30 AM.
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  3. #3
    Registered User
    Join Date
    05-25-2022
    Location
    London
    MS-Off Ver
    Google Sheets
    Posts
    16

    Re: Countif the text in a cell, not text in a formula - Help!

    Noted Jan, thanks for the help.

    The dates are in the email replies tab in column D. The dates it needs to count between are in the overview tab column I & K.

    The formula is needed in the overview tab, in column J. Let's use J7 as the example though.

    B6 to B16 in overview tab shouldn't be included in the count.

    thanks

  4. #4
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Countif the text in a cell, not text in a formula - Help!

    i am in progress to make solution, but i need to know...

    do you require case insensitive or case sensitive?

  5. #5
    Registered User
    Join Date
    05-25-2022
    Location
    London
    MS-Off Ver
    Google Sheets
    Posts
    16

    Re: Countif the text in a cell, not text in a formula - Help!

    You are a saviour!

    Case insensitive is perfect.

  6. #6
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Countif the text in a cell, not text in a formula - Help!

    ok.. heres the final formula (in J7, and dragged up and down) that does the following (from the inside out):

    QUERY to filter for correct date range
    QUERY to remove all entries that contain any of the exclusions
    QUERY to keep only the entries that have the inclusion
    COUNTIF only text values (so not including numeric values or #N/A), it was done this way as other methods may include #N/A as a value, and we don't want that to happen at the last stage otherwise you will get a false count of "1".

    Please Login or Register  to view this content.
    after creating that formula, i decided to take a look at your original COUNTIFS approach, and did a few repairs which now allows it to get the same results as the QUERY method i have used above.

    heres your repaired formula:

    Please Login or Register  to view this content.
    Last edited by janmorris; 07-20-2022 at 02:20 PM.

  7. #7
    Registered User
    Join Date
    05-25-2022
    Location
    London
    MS-Off Ver
    Google Sheets
    Posts
    16

    Re: Countif the text in a cell, not text in a formula - Help!

    Super hero. Thanks for your help here. This is solved.

+ 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. Comparing a tex cell with text column by countif formula
    By lenart2500 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 11-13-2019, 05:56 PM
  2. COUNTIF where the formula's contain certain text
    By JimmyG. in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2016, 07:39 AM
  3. COUNTIF formula to look up text values and the colour of the cell
    By twaccess in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-16-2015, 05:56 AM
  4. [SOLVED] Countif cell contains text OR other text
    By shameus in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-21-2015, 11:27 AM
  5. (FORMULA) Countif the cell contains the text from another cell
    By yhyhyhyh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-21-2014, 12:17 AM
  6. [SOLVED] Count # of times text appears in cell range by cell referencing not =countif(A:A, ="text")
    By smit.etha in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-20-2014, 04:09 AM
  7. Formula to identify part of a text in cell from range of cells & insert adjacent cell text
    By Novicebutnotforlong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2013, 02:11 AM

Tags for this Thread

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