Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to handle if cell contains a word then put a text in another cell?

Here is a list of product ID, and now I want to find if the cell contains a string “KTE”, and then put the text “TRUE” into its adjacent cell as below screenshot shown. Have you any quick ways to solve it? In this article, I am talking about the tricks on finding if a cell contains a word and then putting a text into the adjacent cell.

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately. 60-day Unlimited Free Trial


If a cell contains a word then another cell equals a specific text


Here is a simple formula that can help you to quickly check if a cell contains a word, and then put a text in its next cell.

Select the cell you want to put the text, and type this formula =IF(ISNUMBER(SEARCH("KTE",A2)),"True","") and then drag auto fill handle down to the cells you want to apply this formula. See screenshot:

doc if cell contains a word then equal 8 shot arrow right doc if cell contains a word then equal 9

 

In the formula, A2 is the cell you want to check if contains a specific word, and KTE is the word you want to check, True is the text you want to display in another cell. You can change these references as you need.


If a cell contains a word then select or highlight

If you want to check if a cell contains a specific word and then select or highlight it, you can apply the Select Specific Cells feature of Kutools for Excel, which can quickly handle this job.

Kutools for Excel, with more than 120 handy functions, makes your jobs easier. 

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select the range you want to check if the cell contains a specific word, and click Kutools > Select > Select Specific Cells. See screenshot:


doc if cell contains a word then equal 3

2. Then in the popping dialog, check Cell option, and select Contains from the first drop down list, then type the word you want to check into the next textbox. See screenshot:
doc if cell contains a word then equal 4

3. Click Ok, a dialog pops out to remind you how may cells contains the word you want to find, and click OK to close the dialog. See screenshot:
doc if cell contains a word then equal 5

4. Then the cells containing the specified word have been selected, if you want to highlight them, go to Home > Fill Color to choose one fill color to outstanding them.
doc if cell contains a word then equal 6

Tip. If you want to have a free trial of the Select Specific Cells function, please go to free download Kutools for Excel first, and then go to apply the operation according above steps.


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  • Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  • Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  • Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  • No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  • Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  • 60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  • Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Alex · 10 months ago
    If column has text, alpha-numeric & numeric values, using the convert tool does not apply the text values to numeric. Makes sense. Though, how could you configure a IF Vlookup to compensate if a cell has text?
    • To post as a guest, your comment is unpublished.
      Sunny · 9 months ago
      Sorry, which convert tool you mean? The formula can work correctly whatever the column contains alpha, alpha-numeric or numeric string.
  • To post as a guest, your comment is unpublished.
    Sean · 1 years ago
    Hello,

    Question. If I need this formula to apply to two different returns. For example, if a cell contains the word "Senior", another cell would return "32" and if the cell contains "Associate" then the other cell would return 16.
  • To post as a guest, your comment is unpublished.
    Bryanna · 1 years ago
    Thanks for this. Can this code be edited so that instead of placing specific text beside the source text, it can be formatted to place the text in a different cell?
    • To post as a guest, your comment is unpublished.
      Helen · 1 years ago
      i know what u mean. i need this function to.
      • To post as a guest, your comment is unpublished.
        Sunny · 1 years ago
        Do you mean to extract the text in different cell while the cell contains the specifict text as below screenshot shown?
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Sorry, I do not realy understand your question. Could you give me more detail description?
  • To post as a guest, your comment is unpublished.
    Kas · 1 years ago
    How would you write the formula is you have text-text-text and you want to pull the final text? AB-GUFJ-CD if you want to pull the CD?
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Hello, this formula may help you =TRIM(RIGHT(SUBSTITUTE(A12,"-",REPT(" ",255)),255)), A12 is the text string you use, change it as you need. If it works, please let me know. Thanks.
  • To post as a guest, your comment is unpublished.
    Wise Guy · 1 years ago
    LOL ...did you mean True?
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Embarrrassed...yes, I mean true~~, I have rewrote it, thank u for ur remind.