+ Reply to Thread
Results 1 to 6 of 6

Count the number of occurrence upto now and assign a unique sequence number

  1. #1
    Registered User
    Join Date
    12-22-2016
    Location
    Sri Lanka
    MS-Off Ver
    2016
    Posts
    12

    Question Count the number of occurrence upto now and assign a unique sequence number

    Hi, Im new to the forum and trying to figure out if I can do this;

    I have a list like this
    ABC
    ABC
    ABC
    ZYD
    ZYD
    QWE
    QWE
    ABC
    ABC
    ABC
    ZYD
    ZYD

    and I need to have a sequence number assigned automatically in the next right column.
    For example
    ABC 1
    ABC 2
    ABC 3
    ZYD 1
    ZYD 2
    QWE 1
    QWE 2
    ABC 4
    ABC 5
    ABC 6
    ZYD 3
    ZYD 4

    The solution should give me unique sequence so at the end I can CONCATENATE them as
    ABC1
    ABC2
    ABC3
    ZYD1
    ZYD2
    QWE1
    QWE2
    ABC4
    ABC5
    ABC6
    ZYD3
    ZYD4

    Please note that even ABC occurs at a later stage of the column it still gets a unique assigned number.

    Keeping my fingers crossed and Thanking you all for taking time to solve my problem.

    Cheers.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,800

    Re: Count the number of occurrence upto now and assign a unique sequence number

    With your list in column A, this in column B copied down:

    =A1&COUNTIF(A$1:A1,A1)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-22-2016
    Location
    Sri Lanka
    MS-Off Ver
    2016
    Posts
    12

    Re: Count the number of occurrence upto now and assign a unique sequence number

    Quote Originally Posted by AliGW View Post
    With your list in column A, this in column B copied down:

    =A1&COUNTIF(A$1:A1,A1)
    Hi AliGW,
    That is pure magic !!!
    Thank you so much ! Spent three hours searching for this and just after merely a blink of an eye after posting here, whola !
    Thank you again.

    Cheers

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,800

    Re: Count the number of occurrence upto now and assign a unique sequence number

    Voilą indeed! Glad to have helped.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: Count the number of occurrence upto now and assign a unique sequence number

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  6. #6
    Registered User
    Join Date
    12-22-2016
    Location
    Sri Lanka
    MS-Off Ver
    2016
    Posts
    12

    Re: Count the number of occurrence upto now and assign a unique sequence number

    Quote Originally Posted by JohnTopley View Post
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ok noted. Thanks.
    Done

+ 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] Find unique occurrence of names across a number of columns
    By DPJW in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-21-2016, 09:28 AM
  2. Count number of occurrence between dates
    By Wskip49 in forum Excel General
    Replies: 5
    Last Post: 09-14-2016, 03:06 PM
  3. [SOLVED] Need to count the same data and assign a sequence number
    By Dena in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2015, 07:16 PM
  4. [SOLVED] Creating Unique Number Sequence
    By CCSLBuckles in forum Excel General
    Replies: 3
    Last Post: 10-12-2014, 12:16 AM
  5. [SOLVED] If cell is not blank, assign next number in sequence
    By dylaughin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2012, 03:57 PM
  6. Replies: 5
    Last Post: 11-22-2010, 06:31 PM
  7. unique number sequence
    By stormrider in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-05-2007, 02:25 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