+ Reply to Thread
Results 1 to 4 of 4

Multiple contains function

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Multiple contains function

    I am trying to do a if or statement with a multiple countif statement and im not sure if what I want to do is possible.
    I have a comments column of text and I only want to pull out the text with certain key words. This is my formula at the moment =IF(OR(COUNTIF(B6,"*period*"),B6="*location*"),"true","false").
    Please can some advise if there is any kind of solution to this. Many thanks
    Last edited by oldskool; 10-02-2012 at 11:58 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple contains function

    Try


    =OR(ISNUMBER(SEARCH({"period","location"},B6)))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-02-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Multiple contains function

    Thanks that worked perfectly, Ive spent ages on trying to work it out so thanks a million.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Multiple contains function

    an alternative might be to play around with the countifS() function
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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