+ Reply to Thread
Results 1 to 7 of 7

Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

  1. #1
    Registered User
    Join Date
    11-23-2015
    Location
    Albuquerque, NM USA
    MS-Off Ver
    V.10
    Posts
    6

    Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

    Example:

    Column C is made of cells that contain narrative/descriptive text. I need to do a contains search within those cells to determine if a keyword exists (i.e. Time Capture). If it does exist place that Key word in Column A's cells. If it does not exist do not alter Column A's cells.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    24,264

    Re: Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

    You will need VBA to do this as column A cannot contain both (existing) data and formula.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,240

    Re: Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

    Or, use a helper column to do what you want.

    =IF(A1="*Time Capture*",A1&"Time Capture",A1)

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

    Wildcards don't work in a straight A=B comparison.
    You'd need either search or find (or countif)

    =IF(ISNUMBER(SEARCH("Time Capture",A1)),A1&"Time Capture",A1)

    or with countif

    =IF(COUNTIF(A1,"*Time Capture*"),A1&"Time Capture",A1)

  5. #5
    Forum Guru Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

    Quote Originally Posted by Jonmo1 View Post
    Wildcards don't work in a straight A=B comparison.
    You'd need either search or find (or countif)
    FIND doesn't accept wildcards.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,240

    Re: Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

    Quote Originally Posted by Jonmo1 View Post
    Wildcards don't work in a straight A=B comparison.
    You'd need either search or find (or countif)

    =IF(ISNUMBER(SEARCH("Time Capture",A1)),A1&"Time Capture",A1)

    or with countif

    =IF(COUNTIF(A1,"*Time Capture*"),A1&"Time Capture",A1)
    duh, thanks, wasnt thinking

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Search cells C1:C3000 for keyword and if exists place a keyword in A1:A3000

    Quote Originally Posted by Tony Valko View Post
    FIND doesn't accept wildcards.
    It doesn't require them either.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Search keyword in range of cells, then copy entire cell to another column
    By jreil563 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2015, 12:46 PM
  2. Replies: 6
    Last Post: 03-18-2014, 11:16 AM
  3. Filter List by Keyword & copy the result in column by keyword as header
    By kitunga in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-21-2013, 07:16 AM
  4. [SOLVED] Need to chck if a keyword is present in a text string and return keyword if yes
    By Jekaterina in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-16-2012, 05:55 PM
  5. Replies: 2
    Last Post: 07-13-2012, 04:02 AM
  6. Replies: 1
    Last Post: 12-27-2010, 08:53 AM
  7. [SOLVED] Filter list in place if a cell has a keyword within a formula
    By mcnaught@lincoln in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2005, 10:05 PM

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