Consulting

Results 1 to 4 of 4

Thread: COUNTIF(FIND())

  1. #1
    VBAX Mentor Sir Babydum GBE's Avatar
    Joined
    Mar 2005
    Location
    Cardiff, UK
    Posts
    499
    Location

    COUNTIF(FIND())

    Hi,

    I want to count cells within a range that contain, say, "QWERTY" anywhere within the cell string.

    So if A1 contains "ASDQWERTY", A2 contains "PIYTREWQ" and A3 contains "SQWERTYMM", the count formula will return a 2 on the range A1:A3

    Is this possible?

    Thanks in advance.

    BD
    Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum

  2. #2
    Enter the string you search for in B1

    The formula you need is:
    {=COUNT(SEARCH(B1;A1:A100))}

    {} indicate that this a matrix (or array) formula. Don't enter these brackets manually, but write / paste the formula =COUNT(SEARCH(B1;A1:A100)) and then finish with Ctrl+Shift+Enter

    Formula comes from the heroes at www.excelformeln.de (German only, I'm afraid - write them a thank you anyway!)

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =COUNTIF(A:A,"*QWERTY*")

  4. #4
    VBAX Mentor Sir Babydum GBE's Avatar
    Joined
    Mar 2005
    Location
    Cardiff, UK
    Posts
    499
    Location
    Thanks both - that's fab!

    Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •