+ Reply to Thread
Results 1 to 7 of 7

Writing out a list of wildcards in a formula? involves COUNTIF

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    24

    Writing out a list of wildcards in a formula? involves COUNTIF

    Hello excelforum,

    I am learning excel on my own(mostly from here). I have tried doing a search on the question but have not found anything so far/may be looking wrongly.
    I have written out a formula

    Please Login or Register  to view this content.
    Is there any way i can say combine all my wildcards into a list and use it in the formula without having to type it out?

    I want the formula to produce an error if two or more wildcards are found in the same phrase, if not, return a keyword to be used later.
    The problem is that I have a large list of words such that if the phrase contains these words then an error is produced.
    I have attached a sample workbook.

    Thank you very much!

    Jason
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Writing out a list of wildcards in a formula? involves COUNTIF

    Hi Jason,

    It is achievable using indirect function where I have defined a dynamic name and called that in your formula using indirect function, see attached :-

    sampledata(1).xlsx

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Writing out a list of wildcards in a formula? involves COUNTIF

    maybe also like this as what i've understand..

    also involves named ranges..

    array formula

    lista is the list of the wildcards

    Please Login or Register  to view this content.
    if two or more wild card is found in the cell it will return #N/A
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Writing out a list of wildcards in a formula? involves COUNTIF

    Try this CSE formula in B2,

    =INDEX(EQUIPMENTS, 1, MATCH(TRUE,COUNTIF(A2,"*"&EQUIPMENTS&"*")>0, 0))
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Registered User
    Join Date
    07-09-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Writing out a list of wildcards in a formula? involves COUNTIF

    First of all thank you for replying.

    I have tried each 3 of the methods that mike, vlady and dilip have sent but each do not seem to bring up an error if 2wildcards are found.
    Am i doing something wrong?

    Thanks alot!,

    Jason.

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Writing out a list of wildcards in a formula? involves COUNTIF

    here's my sample data..

    sampledata.xlsx

    sorry bout that.

  7. #7
    Registered User
    Join Date
    07-09-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Writing out a list of wildcards in a formula? involves COUNTIF

    Hello, vlady.

    this is exactly what i wanted.
    thank you!!! i guess i needed to use an array formula.

    Jason

+ 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