+ Reply to Thread
Results 1 to 6 of 6

Function for column that assigns a number (increasing) based on duplicate data

  1. #1
    Registered User
    Join Date
    10-28-2020
    Location
    Canada
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO 16.0.13231.20372 64-bit
    Posts
    5

    Question Function for column that assigns a number (increasing) based on duplicate data

    Hello,

    I am hoping to get help with a formula that will assign a value based on if the data in a separate column is a duplicate of the previous row.

    If the current row is not a duplicate of the previous row, I want the function to assign a number of 1. If it is a duplicate of the previous row, I want the number 2 assigned - where this number increases in an increment of one until new data appears and the numeration resumes at a value of 1.

    I have attached a sample excel file that demonstrates what I need to see with the data - just looking for a formula that automates the value in COLUMN B as I have thousands of rows of data.

    Thank you!!!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    9,876

    Re: Function for column that assigns a number (increasing) based on duplicate data

    Hi & welcome to the board.
    Should the B23 be 1 or should it be 3 as there are two further instances of that date A7 & A8?

  3. #3
    Registered User
    Join Date
    10-28-2020
    Location
    Canada
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO 16.0.13231.20372 64-bit
    Posts
    5

    Re: Function for column that assigns a number (increasing) based on duplicate data

    Should be 1 - I only want it to change from a 1 if the duplicates are consecutive. Sorry should have clarified this in the post.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    9,876

    Re: Function for column that assigns a number (increasing) based on duplicate data

    Ok, how about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-28-2020
    Location
    Canada
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO 16.0.13231.20372 64-bit
    Posts
    5

    Re: Function for column that assigns a number (increasing) based on duplicate data

    Oh wow I was really over-complicating that. That works - thank you so much!

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    9,876

    Re: Function for column that assigns a number (increasing) based on duplicate data

    You're welcome & thanks for the feedback.

+ 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] Excel array function that assigns employee code to customer based on rank series assigned
    By akhilraj005 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-21-2019, 02:28 PM
  2. Duplicate a work area N times , and increasing number in a cell
    By grinta5 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2019, 09:19 AM
  3. [SOLVED] Replace value in column with increasing Number
    By lone.vaas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-07-2019, 09:08 AM
  4. [SOLVED] sort column based on number of duplicate values
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-03-2013, 12:35 PM
  5. Replies: 8
    Last Post: 10-12-2012, 04:48 PM
  6. Replies: 10
    Last Post: 11-08-2010, 02:36 PM
  7. Duplicate number increasing extention
    By cruizer in forum Excel General
    Replies: 7
    Last Post: 10-10-2010, 05:04 AM

Tags for this Thread

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