want to find duplicate Phone numbers when typed in excel 2003

T

trvlpal

I create a column and when i put a phone number in I want to have it
indivcate if its a duplicate perferrable in red
 
T

T. Valko

Let's assume this is your data:

A1: 12345
A2: 54321
A3: 12345

Which cell(s) should be highlighted?
 
C

Charles T. Garrett

Using column "A", place this formula in "conditional formatting" in cell
"A1", and format the font to "red". Now highlight cell "A1" and all of the
cells you want to perform this function in, and "fill down".

=COUNTIF(A:A,A1)>1
 
D

Don Guillett

Right click sheet tab>view code>insert this>change column ltr to suit and
color index to suit.

Private Sub Worksheet_Change _
(ByVal Target As Range)
If Intersect(Target, Columns("M")) _
Is Nothing Then Exit Sub
If Application.CountIf(Columns("m"), _
Target) > 1 Then
MsgBox "Duplicate"
Target.Interior.ColorIndex = 6
End If
End Sub
 
B

Bob Umlas

Select the whole column (say it's col A), use Format/Conditional Formatting,
change "Cell Value Is" to "Formula Is", enter this formula:
=COUNTIF($A$1:$A$1000,A1)>1
click Format, then Patterns tab, then select the red font.
HTH
Bob Umlas
Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top