Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matching Items in a List then Generating Output 1

Status
Not open for further replies.

SaintAugustine

Technical User
Aug 29, 2001
53
US
This is a stupid question, but:

I want Excel to look at the list of items in column A and see if there's any match in column B. Then in column C I want it to say "match" or "no match."

I'm having tons of trouble figuring out how to get the general matching part to work! I know this should be easy, but...

Here's a sample of my data:

Col A Col B
267713 267713
263224 263224
263340 263340
96681 287537
287537 128294
 
Try this:

Select your data in Column A and name it something. Using a named range will make my suggested formula cleaner. In this example I named it "FirstNum". Then in column C enter this formula at the top line:
Code:
=IF(ISERROR(MATCH(B1,FirstNum,FALSE)),"No Match","Match")
Then just drag this cell down to fill in the remainder of column C. You may have to adjust the "1" in B1 to the actual row in your sheet.
 
Oops, rereading your message you may need to reverse it. I had thought you were looking at column B for a match in column A, but it appears you are doing the opposite. Name column B instead of column A and use this:
Code:
=IF(ISERROR(MATCH(A1,FirstNum,FALSE)),"No Match","Match")
Sorry about that.
 
If I read write, this might work too:

=IF($A$1:$A$5=B1,"Match","No Match")

This does not need any table names etc. If you then drag the formula down in column C to as many entries as there are in columns A and B, it should work fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top