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 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?

doc if equal return 1

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:

doc if equal return 2


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:

doc if equal return 3

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:

doc if equal return 4


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:

doc if equal return 5

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:

doc if equal return 6

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.

doc if equal return 7

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!


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

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!
officetab bottom
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.

Be the first to comment.