How to note in adjacent cell if cell value is duplicate?

Human_doing

Board Regular
Joined
Feb 16, 2011
Messages
137
Hi all,

Can anyone please provide the VBA to do the following:

What I'm looking to do is loop through every cell in column A that has an entry, and if that entry has already showed up in the searching of the loop, add a Y in the cell 2 columns to the right i.e. if A10 is a duplicate of A9, a 'Y' is entered in cell C10.

Any help much appreciated,

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I think a formula will be easier.
In C2:
Code:
=IF(ISERROR(MATCH(A2,$A$1:A1,0)),"","Y")
Then drag it down
 
Upvote 0
Hi thanks for getting back to me but these formulae aren't quite what I'm looking for, sorry I should've clarified one thing, I am looking for the info to be added to the relevant cell for only the duplicate copies i.e. if there were 3 occurences, there would be nothing for the first one but 'duplicate or 'Y' would be added for occurences 2 and 3?

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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