Cookies help us deliver our services. By using our services, you agree to our use of cookies.
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 return value in another cell if a cell contains certain text in Excel?

Supposing you have a range of cells, if cell A1 contains a certain text such as “Yes”, you need another cell C1 to return a specific value “approve”. And if cell A1 contains other text, cell C1 returns nothing. This article shows you method to achieve it.

Return value in another cell if a cell contains certain text with formula


Easily select entire rows based on cell value in a certian column:

The Select Specific Cells utility of Kutools for Excel can help you quickly select entire rows based on cell value in a certian column in Excel as below screenshot shown. After selecting all rows based on cell value, you can manually move or copy them to a new location as you need in Excel. Download the full feature 60-day free trail of Kutools for Excel now!

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download the free trial Now!


Return value in another cell if a cell contains certain text with formula

As the example we mentioned above, you can apply the following formula to deal with this problem.

1. Select cell C1 you need to populate value based on text in cell A1, then enter formula =IF(ISNUMBER(SEARCH("Yes",A1)),"approve","") into the formula bar, and then press the Enter key.

Note: In the formula, “Yes”, A1, and “approve” indicate that if cell A1 contains text “Yes”, the selected cell will be populated with text “approve”. You can change them based on your needs.

Then you can see when cell A1 contains text “Yes”, the text “approve” will be populated into the selected cell. But if cell A1 contains other text, the selected cell will be populated with nothing. See screenshot:


Office Tab - Tabbed Browsing, Editing, and Managing of Workbooks in Excel:

Office Tab brings the tabbed interface as seen in web browsers such as Google Chrome, Internet Explorer new versions and Firefox to Microsoft Excel. It will be a time-saving tool and irreplaceble in your work. See below demo:

Click for free trial of Office Tab!

Office Tab for Excel


Related articles:



Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

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.
    Liam Walker · 3 days ago
    Hi, I'm trying to use =IF(ISNUMBER(SEARCH("Name",B20)),"EmployeeNumber","") where I have an input field of Between Cell B20-B75 and I want that If I put a specific person's name in any cell from B20-B75 that their employee number will auto-populate then in the corresponding D column, from D20-D75. So say I put Peter Smith in B20 I want Peter Smith's employee number 700000001to then appear in cell D20, but then should his name appear again anywhere within B20-B75 the same should occur in the corresponding D cell. I hope that's clear enough. Please help!
  • To post as a guest, your comment is unpublished.
    mariana · 4 months ago
    what if I want to add same formula but multiple years? I am trying to say if it contains 2012 then copy value 2012... if text contains 2013 then copy value 2012
  • To post as a guest, your comment is unpublished.
    Gavin · 6 months ago
    HI, if I put JANUARY in cell A1 I would like cell B1 to automatically show "JULY" and so on for the rest of the year with 6 months in between. I don't mind writing a IF JAN then JULY - FEB then AUG formula for each of the months, just can't seem to work out which formula to use and what to write.
    Hope this makes sense. Thank you
  • To post as a guest, your comment is unpublished.
    Chris · 6 months ago
    Hi,

    I am trying to get the below formula to work.
    =IF(ISNUMBER(SEARCH({"Name","Code"},A1)),CONCATENATE(K3,"xx",L3,"hi"))

    It seems to work fine if A1 is populated with "Name", but just states False when A1 is changed to "Code".
    How can I get it to Concatenate if either one of Name or Code is in A1?


    Thanks.
  • To post as a guest, your comment is unpublished.
    Jesse Eastman · 6 months ago
    Hi, I'm curious if this method can be used to auto-fill a series of cells depending on their value by referencing an index list. For example, I've got a list of names numbered 1-10, and have a grid (Grid 1) that has various numbers from that 1-10 in them. I'd like to find a way for the spreadsheet to fill in Grid 2 with the name associated with the number in Grid 1. For example, if D3 (Grid 1) is "2" and the name associated with "2" is "Jerry" then D12 should autofill with "Jerry," but if D3 is changed to "9" then D12 should automatically change to "Goldfish"
    • To post as a guest, your comment is unpublished.
      Jesse Eastman · 6 months ago
      nevermind, I figured it out, just nested a TON of =IF statements:
      =IF(D3=$A$2,$B$2,IF(D3=$A$3,$B$3,IF(D3=$A$4,$B$4,IF(D3=$A$5,$B$5,IF(D3=$A$6,$B$6,IF(D3=$A$7,$B$7,IF(D3=$A$8,$B$8,IF(D3=$A$9,$B$9,IF(D3=$A$10,$B$10,IF(D3=$A$11,$B$11))))))))))