How to format cells from one column which match cells from another column

L

Legacy 362812

Guest
Hi, I'm trying to compare two columns worth of data. I'd like to use conditional formatting (I think?) to compare cells in column A with cells in column B and highlight the matching cells if/when any cell in column A matches any cell in column B. For example:
SparrowEagle
ThrushFalcon
WarblerThrush
RobinCrow
SwallowWarbler

<tbody>
</tbody>

How would I go about doing that? The cells contain text strings which may or may not include punctuation, etc. I'm running Excel 2015 on a mac. Thanks in advance for any advice you have!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Let's say that your data exists in cells A2:B100.

To highlight the column A entries:
- Highlight cells A2:A100 and then use this Conditional Formatting formula:
=COUNTIF(B$2:B$100,A2)
- choose your red text color formatting option

To highlight the column B entries:
- Highlight cells B2:B100 and then use this Conditional Formatting formula:
=COUNTIF(A$2:A$100,B2)
- choose your red text color formatting option
 
Upvote 0
Thanks @Joe4. Hmm, I've got this working (cells are getting colored), but it's not quite working the way I'd expect. For example, I've got something like "President Lincoln" in A:24 and the same string, "President Lincoln" in B:14, but they're not lighting up. The ones that are lighting up don't quite make sense (I don't see the duplicate in the other column). Maybe it would make more sense to highlight the entire field and create a conditional format that checks for and marks duplicates. How would I go about doing that?
 
Upvote 0
I solved this with something I learned is more basic and native to Excel. This image describes it. Here are the steps:
1. Select the cells you want to compare.
2. Home Tab > Conditional Formatting > Highlight Cells Rules > Duplicate Values.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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