Formula to identify if for a unique identifier there is more than one value in another column

vanbooth

New Member
Joined
Apr 3, 2017
Messages
15
I have two columns of data, one contains a unique identifier, the other contains another 4 digit key.

What I want to do is for the unique identifier when there is more than one 4 digit key that is associated to it, I would like to to display x. Marking both entries not just the first or second. For example:

4 digit KeyUnique IdentifierDuplicate
PL01AB
BE01ABC
BE01ABCD
BE01ABCDEx
FR05ABCDEx
BE01ABCDEFx
GB30ABCDEFx
GB30ABCDEFG
PL01ABCDEFGH
GB30ABCDEFGHIx
PL01ABCDEFGHIx

<tbody>
</tbody>


Does anyone have any suggestions for how to best tackle this?

TIA
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
That is seeming to put an x on the next row instead of the current row

For example green is where the x should be, red is where it is:

Realigned LocationRealigned Product, Sold to and Ship to
BE01BAK-D1NV-0002341223412
BE01BAR-D5-UTZ-00010242897
BE01CAL-D2-UTZ-0004679619910
BE01CAL-M1-UTZ-0004679619910
BE01CAL-M2-UTZ-000102446755
BE01CHB-F138861D16-0001981919819
BE01CHB-F160112D02-00065606560
BE01CHB-F168260D01-00065606560
BE01CHD-F073034B03-00021962196
BE01CHD-F111094-02-0001811118111
BE01CHD-F120036-02-0001220195
BE01CHD-F120149-15-0001927519275
BE01CHD-F130042B07-000498641089
BE01CHD-F138365U01-000102446755
BE01CHD-F138663B02-00065496549 x
BE01CHD-F138949U04-00016011601x
BE01CHD-F140106-01-00013051305
BE01CHD-F140106-01-0002341223412
BE01CHD-F140296B01-00013261326

<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>

Thanks!
 
Upvote 0
You did put the right formula into the second row? You didn't reference row 1 there?


Book1
ABC
1Realigned LocationRealigned Product, Sold to and Ship toX?
2BE01BAK-D1NV-0002341223412 
3BE01BAR-D5-UTZ-00010242897
4BE01CAL-D2-UTZ-0004679619910
5BE01CAL-M1-UTZ-0004679619910
6BE01CAL-M2-UTZ-000102446755
7BE01CHB-F138861D16-0001981919819
8BE01CHB-F160112D02-00065606560
9BE01CHB-F168260D01-00065606560
10BE01CHD-F073034B03-00021962196
11BE01CHD-F111094-02-0001811118111
12BE01CHD-F120036-02-0001220195
13BE01CHD-F120149-15-0001927519275
14BE01CHD-F130042B07-000498641089
15BE01CHD-F138365U01-000102446755
16BE01CHD-F138663B02-00065496549x
17BE01CHD-F138949U04-00016011601
18BE01CHD-F140106-01-00013051305
19BE01CHD-F140106-01-0002341223412
20BE01CHD-F140296B01-00013261326
21BF01CHD-F138663B02-00065496549x
Sheet1
Cell Formulas
RangeFormula
C2=IF(COUNTIFS($B:$B,$B2,$A:$A,"<>"&$A2)=0,"","x")


WBD
 
Upvote 0
Thank you! I went with option two and defined the names - in C2 I can't seem to get the Ctrl+shift+enter to work. When I paste into the formula bar and Ctrl+shift+enter it just takes me to C3. I did notice when I click back on the formula in C2 in the formula bar it displays as {=IF(SUM(IF(FREQUENCY(IF(Concat=B2,MATCH(Key,Key,0)),ROW(Key)-ROW(INDEX(Key,1,1))+1),1))>1,"x","")} but when you click back in the formula bar the {} dissapear.

What am I doing wrong?

Thanks again!

See the workbook that implements the set up: https://www.dropbox.com/s/ckse5a7rf...re than one value in another column.xlsx?dl=0
 
Upvote 0

Forum statistics

Threads
1,216,523
Messages
6,131,171
Members
449,627
Latest member
ChrisNoMates

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