Alter Duplicate Product ID Entries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column "Product ID" which uses mixed text and numerals. The
database is huge and there are many duplicates. I want to assign a new
Product ID to the duplicates by adding a "-1" "-2", etc. to the duplicates.
I have identified the duplicates and have them sorted by Product ID. Is
there a way to automate this otherwise lengthy, phenomenally boring task?
Thanks for any help you can provide.
 
So if you have:

ASDF
ASDF
ASDF

you want
ASDF
ASDF-1
ASDF-2

If yes, you could use a formula like this in B2:
=A2&IF(COUNTIF($A$2:A2,A2)=1,"","-"&COUNTIF($A$2:A2,A2)-1)

if you wanted:
ASDF-1
ASDF-2
ASDF-3

You could use:
=A2&"-"&COUNTIF($A$2:A2,A2)

(I like the second method.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top