Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Needed a "contains" function.....anyone developed such an animal?

Data Filtering does allow for the "contains" option however there is no function in EXCEL which provides that capability....... Need a COUNTIF function based on text contained within a cell or series.

Update:

Sample data is as follows: in Col A2:A6

Field

lvl

fl

lvl flr

tag

lvl

The following formula gives answer of 2 when s/b 3 based on fact the "lvl" appears in 3 cells

=COUNTIF($A$2:$A$6,"lvl")

Update 2:

Donut Tim......... your answer does NOT give the expected result....... see my additional details added which provides data sample and the result obtained.....

3 Answers

Relevance
  • 8 years ago
    Favorite Answer

    This formula counts cells containing certain text in the range named "Data". The text that is searched is located in cell A1.

    =COUNTIF(Data, A1)

    You can use the wildcard character, *, to represent any characters. If you want to count all cells that contain John Jones, John Johnson and John James you can use John J* as the search text.

    . .

  • 7 years ago

    In my version, Excel Help says

    "You can use the wildcard characters — the question mark (?) and the asterisk (*) — in criteria. A question mark matches any single character, and an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character."

    Thus, with =COUNTIF($A$2:$A$6,"*lvl*") I find I get the right answer.

  • Anonymous
    7 years ago

    hard stuff. seek with yahoo and bing. that will might help!

Still have questions? Get your answers by asking now.