View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] wrethams@gmail.com is offline
external usenet poster
 
Posts: 17
Default How to make duplicated values unique according to a rule

I have a list of values that are all the same length and end take the
form xxxxxxLO
where x is any letter A-Z.

Several rows contain the same value and I want to make these unique
according to the following rule:

locate next value
check if it's a duplicate
if not move on
else ignore the first instance and replace LO with AB, AC, AD...etc
for all subsequent duplicates

so where I previously had

ABCDEFGLO
ABCDEFGLO
ABCDEFGLO
ABCDEFGLO
ABCDEFGLO
DDGFTGELO
DDGFTGELO
DDGFTGELO

I would now have:

ABCDEFGLO
ABCDEFGAB
ABCDEFGAC
ABCDEFGAD
ABCDEFGAE
DDGFTGELO
DDGFTGEAB
DDGFTGEAC