Rename duplicates with random alphabets in a column - Excel

后端 未结 2 442
庸人自扰
庸人自扰 2021-01-16 20:07

I have a list of 500 names in column A.

1  name1
2  name2
3  name3
4  name1
5  name2
6  name3
7  name1
8  name2
9  name3
..

And i need to

2条回答
  •  一整个雨季
    2021-01-16 20:22

    If you prefer to use a non-random prefix that just contains the next letter, you could do something like this starting in C2:-

    =IF(B2=B1,CHAR(96+COUNTIF(B$1:B1,B2))&"."&B1,B2)
    

    I'm assuming that the names are sorted, have a heading and are in column B.


    If you didn't want to sort them, this would still work with a modification:-

    =IF(COUNTIF(A$1:A1,A2)>0,CHAR(96+COUNTIF(A$1:A1,A2))&"."&A2,A2)
    

    I'm assuming that the unsorted names are in column A, with a header.

提交回复
热议问题