Comparing and Returning Results

dgaines

New Member
Joined
Sep 15, 2017
Messages
10
Hello, I'm needing help creating a syntax for the following scenario. I have two sheets in an Excel file. I'm wanting to take column A from Sheet2 and see if there are any matches in column B of Sheet1, then if there is a match(or same containing character sequence) then return value "retired" to column H on Sheet1. If there is no match then just leave it blank. Thanks.:)
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
If you want exact matches, assuming you have headers in row 1 of both sheets, enter in H2 of Sheet1 and copy down to the end of Sheet1, col B data:
Rich (BB code):
=IF(ISNA(MATCH(B2,Sheet2!$A$2:$A$100,0)),"","retired")
Change the row in bold red to suit the extent of your data in Sheet2.
 
Last edited:
Upvote 0
If you want exact matches, assuming you have headers in row 1 of both sheets, enter in H2 of Sheet1 and copy down to the end of Sheet1, col B data:
Rich (BB code):
=IF(ISNA(MATCH(B2,Sheet2!$A$2:$A$100,0)),"","retired")
Change the row in bold red to suit the extent of your data in Sheet2.


Thanks for the reply, it's not throwing any errors but i don't see any matches hitting. And it doesn't have be to an exact match or even on the same row. For instance if row 7 from Sheet2 has "123456" id like for it detect a match say on Sheet1 row 3 with "ABC123456", and then throw a "retired" on row 3, column H on Sheet1.
 
Upvote 0
Thanks for the reply, it's not throwing any errors but i don't see any matches hitting. And it doesn't have be to an exact match or even on the same row. For instance if row 7 from Sheet2 has "123456" id like for it detect a match say on Sheet1 row 3 with "ABC123456", and then throw a "retired" on row 3, column H on Sheet1.
As I said in my post, the formula I provided is for Exact Matches.

Try searching this forum for "fuzzy matches".
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top