Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Duplicate Entries ConfusedNHouston Excel Discussion (Misc queries) 2 October 11th 06 04:01 AM
Duplicate Entries Phxlatinoboi® Excel Discussion (Misc queries) 2 August 24th 06 01:17 AM
removing duplicate entries armagan Excel Discussion (Misc queries) 1 June 12th 06 05:42 PM
Removing duplicate entries. dh01uk Excel Discussion (Misc queries) 2 January 13th 06 03:51 PM
count duplicate (or, inversely, unique) entries, but based on a condition markx Excel Worksheet Functions 3 March 8th 05 06:57 PM


All times are GMT +1. The time now is 07:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"