+ Reply to Thread
Results 1 to 6 of 6

Google Sheets - COUNTIF (complex)

  1. #1
    Registered User
    Join Date
    07-01-2019
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    18

    Google Sheets - COUNTIF (complex)

    Here is tough one

    I have a Conditional Format via Formula

    Please Login or Register  to view this content.
    Capture1.PNG

    How it works - when I type if B1 any phrase "Bed Covers"
    below gets highlighted with some or partial of the text

    Capture.PNG

    Now what I wanted to do is do a COUNTIF on the Range using the above code.

    1. =COUNTIF(A5:A30,NOT(ISERROR(FIND(LOWER(A4),LOWER($B$1)))))

    This returns 0

    Perhaps because it's like an array?

    GOAL is to get a count of what is highlighted using the same formula

    Thank you

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Google Sheets - COUNTIF (complex)

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-01-2019
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    18

    Re: Google Sheets - COUNTIF (complex)

    Hi ALAN - I did attempt to add a link and got the error: "You are not allowed to post any kinds of links, images or videos until you post a few times."
    So when I deleted the line - it went through. I should have kept the "Cross Post" reference but that was removed with the URL

    Is this site the same as Mr. Excel? If it is the case I might just rather use this one.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Google Sheets - COUNTIF (complex)

    Is this site the same as Mr. Excel?
    Please read the link provided by Alan about cross posting to help you understand what it's all about
    You can paste a link stripped of the "http:" part

  5. #5
    Registered User
    Join Date
    07-01-2019
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    18

    Re: Google Sheets - COUNTIF (complex)

    mrexcel.com/board/threads/countif-complex-google-sheets.1127874/#post-5449337 (Duh I added the wrong site at first)

    I couldn't even include the w w w portion
    Last edited by RLONG98; 03-18-2020 at 05:05 PM.

  6. #6
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Google Sheets - COUNTIF (complex)

    Quote Originally Posted by RLONG98 View Post
    . . . =NOT(ISERROR(FIND(LOWER(A4);LOWER($B$1)))) . . .
    Why not just use case-insensitive functions? If A4 doesn't contain ~, * or ? and doesn't begin with a comparison operator like =, you could reduce this to

    =COUNTIF($B$1;"*"&A4&"*")

    Even if you had to use FIND because of wildcards or comparison operators at the beginning of A4,

    =COUNT(FIND(LOWER(A4);LOWER($B$1))

    . . . Now what I wanted to do is do a COUNTIF on the Range using the above code.

    =COUNTIF(A5:A30,NOT(ISERROR(FIND(LOWER(A4),LOWER($B$1)))))

    This returns 0 . . .
    The last formula returns 0 because COUNTIF's 2nd argument can be either TRUE or FALSE, nothing else. Since neither of those values appear in A5:A30, COUNTIF correctly returns 0.

    Do you want to count the number of cells in A5:A30 which contain something? If so, what would they contain?

+ 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. GOOGLE SHEETS: countif with dynamic range
    By Headburst in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 11
    Last Post: 12-30-2019, 09:59 AM
  2. GOOGLE SHEETS: countif with dynamic range
    By Headburst in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-30-2019, 08:41 AM
  3. Google Sheets: Simplify a very complex INDIRECT formula
    By Perlapimpim in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 13
    Last Post: 08-03-2019, 09:10 AM
  4. Converting Unique,Filter,Countif formula in Google Sheets to Excel
    By imnotarobot in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-02-2019, 09:51 AM
  5. Google Apps Script for Google Sheets Pulling Formulas from Master to Several Slave Sheets
    By excelroofing in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 08-22-2018, 02:06 AM
  6. email row contents based on cell values (google sheets populated by google forms)
    By reedg in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 01-13-2016, 02:55 PM
  7. Replies: 1
    Last Post: 01-25-2014, 02:10 PM

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