ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Alter Duplicate Product ID Entries (https://www.excelbanter.com/excel-worksheet-functions/115394-alter-duplicate-product-id-entries.html)

Mike

Alter Duplicate Product ID Entries
 
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.

Dave Peterson

Alter Duplicate Product ID Entries
 
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.)

Mike wrote:

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.


--

Dave Peterson

Mike

Alter Duplicate Product ID Entries
 
That did it! Thanks so much. I'm sure you save me 16 hours or more of data
entry.

"Dave Peterson" wrote:

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.)

Mike wrote:

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.


--

Dave Peterson


Dave Peterson

Alter Duplicate Product ID Entries
 
Watch the mail for my bill! <bg

Glad it worked.

Mike wrote:

That did it! Thanks so much. I'm sure you save me 16 hours or more of data
entry.

"Dave Peterson" wrote:

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.)

Mike wrote:

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.


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com