How to return another cell if one cell equals text or another in Excel?
For example, I have the following data range, now, I want to extract the values in column C if the corresponding data in column A equals adjacent data in column B as below screenshot shown. How could I deal with this task in Excel?
Return another cell if one cell equals another with formula
Return another cell if one cell equals specific text with formula
Return another cell if one cell equals specific text with Kutools for Excel
Return another cell if one cell equals another with formula
Here is a simple formula can help you to return the value in another cell if one cell equals the adjacent one, please do as this:
Enter this formula: =IF(A2=B2, C2, "") (A2 and B2 are the two cells that you want to compare, and C2 is the cell value that you want to return) into a blank cell where you want to display the result, and then drag the fill handle down to the cells that you want to return the corresponding values, see screenshot:
Return another cell if one cell equals specific text with formula
Here is another situation, let’s say, you have two columns, and you need to return the cell value based on another cell if it contains a specific text, such as “Yes” as following screenshot shown:
To deal with this task, you should apply this formula: =IF(B2="yes",A2,"") into a blank cell to output the result, and then drag the fill handle down to the cells that you want to contain this formula, and all the values adjacent your specific text have been returned as following screenshot shown:
Return another cell if one cell equals specific text with Kutools for Excel
If you have Kutools for Excel, with its Select Specific Cells feature, you can quickly select the rows with the specific text value, and then paste the rows into another place as you need.
Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. |
After installing Kutools for Excel, please do as follows:
1. Select the column which contians the specific text you need, and then click Kutools > Select > Select Specific Cells, see screenshot:
2. In the Select Specific Cells dialog box, select Entire row from the Selection type, then choose Equals under the Specific type sectionand and enter the specified text "Yes" into the text box, , see screenshot:
3. Then click Ok button, all rows which contain the specific text have been selected, and then copy and paste the selected rows into another cells as you need, you will get the follwoing result as you want.
Download and free trail Kutools for Excel Now !
Demo: Return another cell if one cell equals specific text with Kutools for Excel
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!
Best Office Productivity Tools
Supports Office/Excel 2007-2021 and 365 | Available in 44 Languages | Easy to Uninstall Completely
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need Is Just A Click Away...
Supercharge Your Excel Skills: Experience Efficiency Like Never Before with Kutools for Excel (Full-Featured 30-Day Free Trial)
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day! (Full-Featured 30-Day Free Trial)
