Skip to main content

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!

Best Office Productivity Tools

Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

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!
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
trying to find out how to pull a value from another sheet into a cell based on the value of a different cell.
example: sheet one is a on going list of orders for a store. sheet two list all the stores and how far they are from a distribution center. when im typing in the order into sheet one and i tell it that im shipping to the 'red' store, i want it to pull the miles listed from sheet two for that store over to sheet one.
This comment was minimized by the moderator on the site
if A1 has corresponding value in B1 and A2 in B2 and so on. using Dropdown if I select A2 then in next column how the value equals to B2 will occur.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations