two identical names in different columns in Excel

Pauls123

Board Regular
Joined
Mar 22, 2011
Messages
180
Hi all,

I have a simple spreadsheet where in two of the colums have names in them. Column E and column L. A certain name may appear just the once in both of the columns, no more than once.

I want to highlight/find the names that appear in both columns?

Any suggestions please

Paul
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi Jon,

Thanks for your reply. There may be heaps of similar names, not just the one name. But a name would only appear the once in both columns. Not sure if that would work in conditional formatting?

Paul
 
Upvote 0
Conditional formatting will work very well in this case. Just select both columns (use Ctrl+click if necessary) and follow the instructions in the link above under the first heading - "Highlight duplicate values with color".
 
Upvote 0
Code:
Sub Maybe()
Dim c As Range
    For Each c In Range("E2:E" & Cells(Rows.Count, 5).End(xlUp).Row)
        If Application.WorksheetFunction.CountIf(Range("L:L"), c.Value) > 0 Then c.Interior.Color = vbRed
    Next c
End Sub
 
Upvote 0
Hey Jon, That is brilliant, I didnt realise you could do a conditional formatting for two separate columns. Excellent. And also thanks Jolivanes. Your formula is a bit too advanced for me.

Thanks again, Paul
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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