Home > Mobile >  Search Duplicate Cells in Column and Incrementally Append Number to create Unique Value
Search Duplicate Cells in Column and Incrementally Append Number to create Unique Value

Time:12-21

I have a column that has duplicate entries. I need to create unique values for each entry by adding a number to the end of it.

Example: Column A

  1. John Doe
  2. Jack Tee
  3. John Doe

Column B (solution Column)

  1. John Doe
  2. Jack Tee
  3. John Doe 1

I searched a lot and couldn't find an answer! Any help is appreciated.

I'm using Microsoft (excel) 365 and running the latest version, if that makes any difference.

CodePudding user response:

Countif can do that for you:

=IF(COUNTIF(A$2:A2,A2)>1,A2 & " " & COUNTIF(A$2:A2,A2)-1, A2)

enter image description here

  • Related