+ Reply to Thread
Results 1 to 5 of 5

Increment duplicate numbers by adding a - and sequential number

  1. #1
    Registered User
    Join Date
    08-09-2019
    Location
    Richmond, Va
    MS-Off Ver
    365 MSO v2302
    Posts
    28

    Increment duplicate numbers by adding a - and sequential number

    I'm trying to eliminate a number of duplicate serial numbers in a worksheet. The duplicates have numbers and test and I'd like to add a - and sequential number for the duplicates. Once I get to the end of the duplicates and another batch of duplicates begin I'd like to start - and sequential number all over until I get to the bottom of the duplicates. Spreadsheet attached with what I see and what I want the output to look like. Thanks so much for your help!
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Increment duplicate numbers by adding a - and sequential number

    maybe this... =IF(COUNTIF($B$2:B2,B2)=1,B2,B2&"-"&COUNTIF($B$2:B2,B2)-1)
    in E2 dragged down.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Increment duplicate numbers by adding a - and sequential number

    In column C...
    =IF(COUNTIF($B$1:B2,B2)>1,B2&"-"&COUNTIF($B$1:B2,B2)-1,B2)

    Copy down.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Registered User
    Join Date
    08-09-2019
    Location
    Richmond, Va
    MS-Off Ver
    365 MSO v2302
    Posts
    28

    Smile Re: Increment duplicate numbers by adding a - and sequential number

    Thanks to both of you for providing an easy way to eliminate these duplicates! I tried both solutions and both worked great.

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Increment duplicate numbers by adding a - and sequential number

    You are welcome and thanks for the rep

    If you are satisfied with the solution provided. Please mark the thread as solved, by using thread tools found at top of your initial post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formula to increment a number with other numbers/chracters in a cell remaining constant.
    By xanthius in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-03-2018, 12:19 PM
  2. Sequential Time Ticket Number Generator on Print won't increment
    By KG869 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2015, 03:07 PM
  3. Setting Range of sequential numbers with a * before and after each number
    By Craig Scott in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2015, 08:02 AM
  4. Fill in missing sequential increment.
    By jeff p in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2014, 09:55 AM
  5. Re-number sequential numbers.
    By vpestana in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-14-2014, 08:49 PM
  6. Auto Sequential Invoice number on a duplicate sheet
    By learnerspermit in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2013, 03:55 AM
  7. Sequential number - adding and deleting rows
    By Suzan in forum Excel General
    Replies: 2
    Last Post: 01-04-2006, 05:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1