Finding duplicate values in the same column

cwilliams96

Board Regular
Joined
Jul 27, 2003
Messages
186
I have 2 columns A & B

in column B there are hundreds of values but some of them potentially may be the same.

I wanted to have in say column A a flag that tells me if the value in column B exists elsewhere in the column B

i.e
A B
26548
15487
14789
45789
EXISTS 26548
72628
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

wob

Board Regular
Joined
May 21, 2002
Messages
105
in cell C1 put in the formula

=countif(B:B,B1)

and copy the formula down.

Any values greater than 1 are have been duplicated.
 

cwilliams96

Board Regular
Joined
Jul 27, 2003
Messages
186
Sorry I may have not expained correctly, the values in col B are letters and numbers

eg

JSC-34-352729

I wanted to put a phrase in the column a next to the duplicate value
 

pagrender

Well-known Member
Joined
Sep 3, 2008
Messages
652
Using Wob's formula:
=IF(COUNTIF($B$1:B1,B1)>1,"EXISTS","")

Paste this formula into cell A1 and drag it down. If your data starts in a different cell (A2, for example), change the cell references.

Pete
 

wilcowoods

Active Member
Joined
May 29, 2008
Messages
275
I have 2 columns A & B

in column B there are hundreds of values but some of them potentially may be the same.

I wanted to have in say column A a flag that tells me if the value in column B exists elsewhere in the column B

i.e
A B
26548
15487
14789
45789
EXISTS 26548
72628
Or you could use conditional formatting / highlight cell rules / duplicates if you just want to highlight the duplicate number!
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,597
Messages
5,512,324
Members
408,886
Latest member
kashifziatevta423

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top