+ Reply to Thread
Results 1 to 3 of 3

Return specific text if a different text is contained anywhere in a range of cells

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    SLC, UT
    MS-Off Ver
    Excel 2010
    Posts
    12

    Question Return specific text if a different text is contained anywhere in a range of cells

    I need to create a formula that will return a specific text ("FSC No.ABC-123-456") in one cell (C9) if the text "FSC" is found anywhere in another range of cells (C2:C7).

    Some cells in the range will just be numbers and/or letters, others will have "FSC" as part of the cell, but usually not at the beginning or end. If "FSC" is not found, do nothing.

    I tried the formula: =IF(ISNUMBER(SEARCH("*FSC*",C2:C7)),"FSC No.ABC-123-456",””) but that returned an error.
    I have also tried a couple of VLOOKUP functions, but nothing works.

    I've attached an example
    test.xlsx

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Return specific text if a different text is contained anywhere in a range of cells

    Try

    =IF(COUNTIF($C$2:$C$7,"*FSC*")>0,"FSC No.ABC-123-456","")

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    SLC, UT
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Return specific text if a different text is contained anywhere in a range of cells

    That worked perfectly - thank you so much!

+ 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