+ Reply to Thread
Results 1 to 3 of 3

VBA to count number in column and give number sequence in next column

  1. #1
    Forum Contributor
    Join Date
    11-17-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    365

    VBA to count number in column and give number sequence in next column

    I have number in Column B in sorted by ascending order. some numbers are unique and some numbers are duplicate. In example I have given maximum duplicate of 3 but in actual duplicate may go upto 10 times
    I want give number with extension (number of existence) in Column C. Please refer attachment . My data type and desire result mentioned


    For Example

    Row Number two there is a number 5 in column C and it is exist only one time. Hence Existence Given as 1 i.e. 5 Exist 1st time
    Row Number three there is a number 8 in column C and it is exist only one time. Hence Existence Given as 1 i.e. 8 Exist 1st time
    Row Number four, five and six there is a number 55 in column C and it is exist three time. Hence Existence Given against respective numbers as as 1 i.e. 55 Exist 1st time, 55 Exist 2nd time, 55 Exist 3rd time
    Row Number Eight and nine six there is a number 60 in column C and it is exist two time. Hence Existence Given against respective numbers as as 1 i.e. 60 Exist 1st time, 60 Exist 2nd time

    Note: In example I have given maximum duplicate of 3 but in actual duplicate may go upto 10 times: So the result should be exist 8th time, 9th time, etc.
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA to count number in column and give number sequence in next column

    You could use the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    in C2, and copy down.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to count number in column and give number sequence in next column

    Maybe:

    Please Login or Register  to view this content.

+ 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. auto- sequence number based on another column?
    By maynard in forum Excel General
    Replies: 6
    Last Post: 07-29-2016, 10:31 PM
  2. Replies: 7
    Last Post: 06-08-2015, 08:39 AM
  3. [SOLVED] Number sequence column B if a condition is met in column A
    By MICowboy13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2014, 10:51 AM
  4. Hep filling column with a number sequence whenever value changes
    By kkxm in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-13-2014, 02:00 PM
  5. Replies: 1
    Last Post: 03-13-2013, 03:36 PM
  6. Replies: 5
    Last Post: 11-22-2010, 06:31 PM
  7. Repeating number sequence in a column
    By Nexan in forum Excel General
    Replies: 3
    Last Post: 03-31-2005, 03:06 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