+ Reply to Thread
Results 1 to 4 of 4

if one of many different text strings is found in a cell apply a corresponding text string

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Angry if one of many different text strings is found in a cell apply a corresponding text string

    I have two excel sheets,

    the first one is a parts list with two columns: column A equipment description and column B subcategory

    the second sheet has two columns: column A keywords and column B subcategory

    I want a function that will apply a subcategory to sheet 1 column B if the keywords in sheet 2 column A are found in Sheet 1 column A BUT the key words are mixed in with other words.

    examples of the part descriptions are as follows:
    wicket gate bolt
    screw for wicket gate
    8" wicket gate pipe

    my keyword in this case would be "wicket gate"

    I've tried using INDEX, LOOKUP, VLOOKUP but I've had no luck because the keywords are seldom by themselves.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: if one of many different text strings is found in a cell apply a corresponding text st

    I don't understand exactly what you are doing but you should probably be using wildcard(s) for your search value.

    Like: =VLOOKUP("*wicket gate*",range,2,0)

    which would find the first value in the searched range that contains wicket gate.

  3. #3
    Registered User
    Join Date
    05-24-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Angry Re: if one of many different text strings is found in a cell apply a corresponding text st

    Yeah I tried that but I don't think you can apply a wildcard to a search range. The way my problem is set up you would need to use
    =VLOOKUP("wicket gate","*"&range&"*",2,0) which doesn't work.

    This should explain my problem better; I want to fill the blank column on this sheet:
    parts list.PNG

    And this is the information that I want to use to do it:
    subcategories.PNG

  4. #4
    Registered User
    Join Date
    05-24-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Talking Re: if one of many different text strings is found in a cell apply a corresponding text st

    Nevermind I figured it out. I wrote a function in the VBA editor thingy.

    Please Login or Register  to view this content.
    this does exactly what I wanted. I couldn't for the life of me find any built in functions that could do this.

    Thanks for the help.

+ 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