+ Reply to Thread
Results 1 to 5 of 5

Re-generating incremental numbers

  1. #1
    Registered User
    Join Date
    06-22-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2021
    Posts
    62

    Re-generating incremental numbers

    Help needed please, I want to have incremental number 1 2 3 ...... in column A but this should restart from 1 again if the value in column B changed, as below.
    Please Login or Register  to view this content.
    Last edited by razaas; 09-05-2011 at 04:16 AM. Reason: Moderator advised

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Re-generating incremental numbers

    Enter the three first values - Copy the range -Select the range to copy to - Paste

  3. #3
    Forum Contributor
    Join Date
    06-15-2011
    Location
    Chester, England
    MS-Off Ver
    Excel 2013
    Posts
    117

    Re: Re-generating incremental numbers

    If you have headers, in cell A2:

    =IF(B2=B1,A1+1,1)

    And fill down

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,055

    Re: Re-generating incremental numbers

    try this: =COUNTIF($B$2:B2, B2)

    What you expect if some number appear latter?
    Check what this formula will retun. In case of number 7 it will continue at number 4

    Please Login or Register  to view this content.

    While above appraoch will return 1.

    Please Login or Register  to view this content.
    Last edited by zbor; 09-05-2011 at 04:05 AM.
    Never use Merged Cells in Excel

  5. #5
    Registered User
    Join Date
    06-22-2009
    Location
    Kuwait
    MS-Off Ver
    Excel 2021
    Posts
    62

    Re: Re-generating incremental numbers

    Tone640 & Zbor, Thanks a lot for such great help, not only my problem solved but also I learned two new formulas. As the number in ColB not going to repeat again later, therefore Tone640's formula is suitable. Thanks again and have a great day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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