Hi KUStudent,

Please have your Unique Id start with an alpha as it avoids issues with leading zeros and maths rounding.

Here I generated 3,000 random usernames of 8 characters in column B. I had no duplicates so I forced some to test (i.e. JYPGKQFK, XWYXGPHP).

Column C generates a random 6 character key but of course recalculates every time Excel recalculates so the first thing is to copy the column and paste as Values into column D.

Now we remove all duplicates with the formula in column E to help. The values in H1 and H2 show which row has a duplicate and how many others remain. You'll need to go to each row with an X in column E and change the last digit in column D. You'll know it worked because the X will disappear (I had to change 4 in my 3,000 sample).

Now we want to add back duplicates where the same Username appears so that's done with the column F formula.

Now you can take column F and paste as Values next to your usernames to get the final list.