INDEX or MATCH?

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,557
Office Version
  1. 365
Platform
  1. Windows
I have a list of about 1,000 house address numbers in column A (beginning in A2). In column B, I have exported house address numbers (from an external database) for completed home inspections. What I need to do is match the address numbers in column B against column A to find out which addresses have not been inspected yet. What I would like to do is have the formula return a true / false option so that I can quickly sort out the addresses that do not have a match so we can know what homes need to be inspected.

What is a quick way to do this? I believe either INDEX or MATCH (or both) is requisite but I am not sure how to compose the formula.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Would conditional formatting work for you?
If so would you want to highlight col A if the value isn't in col B?
 
Upvote 0
That should work as long as there are no blanks. For example, if an address in column A does not have a match in column B (e.g., 109, 110, and 112 below), I need those addresses to stand out so that I can filter or sort out the addresses that do not have a match. At the end of the day, I want to have a list of addresses without a match to present to my boss so he knows what homes to inspect:

107 True
108 True
109 False
110 False

111 True
112 False
 
Upvote 0
Ok, select A2 to end of data in column A & use this formula in CF
=AND(A2<>"",ISNA(MATCH(A2,$B$2:$B$50,0)))

You can the use the autofilter to show highlighted rows
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Quick question: once I sort the data so that all unique values (or cells highlighted in yellow) are on top of column A, how do I remove the duplicates (or cells not highlighted yellow)? I am trying to make this a macro so other people can use it and right now, I am manually deleting the duplicates.
 
Upvote 0
You can use the autofilter to show non highlighted cells & then delete the visible cells.
 
Upvote 0
Yes, that is what I am doing but I am trying to automate all actions here so my not-so-tech-savvy coworkers can easily run the report without my assistance.
 
Upvote 0
Simply use the macro recorder to record what you do manually & you will have the code.
It may need some tweaking, so if you post the code I'll have a look at it.
 
Upvote 0

Forum statistics

Threads
1,215,106
Messages
6,123,122
Members
449,096
Latest member
provoking

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