What formula can I use to get the result in column A, as shown below: Col-A Col-B 1 B-001 if it is unique 2 B-001 if it is repeated 1 B-003 if it is unique 2 B-003 if it is repeated 3 B-003 if repeated again Thanks in advance.