Incrementing Duplicates

nosferer

New Member
Joined
May 1, 2002
Messages
1
Hello there

How do I scan a column for duplicates and increment each duplicate by one..i.e. if the text AAA and BBB occurs a number of times in a single column how do I scan that column and change the text to AAA001 AAA002 BBB001 etc
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Lets assume that the data (AAA,BBB, etc) start at row 2 in A. Row 1 has a label in A1 and B1 empty.

In B2 enter and copy down:

=A2&TEXT(IF(COUNTIF($B$1:B1,A2&"*")=0,1,COUNTIF($B$1:B1,A2&"*")+1),"000")

Aladin
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,194
Members
449,072
Latest member
DW Draft

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