+ Reply to Thread
Results 1 to 6 of 6

Auto increment each row based on value of another cell on same row

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    29

    Auto increment each row based on value of another cell on same row

    I have a spreadsheet formatted like the below...

    id name options increment value
    50 name A options A value A
    50 name A options A value A
    50 name A options A value A
    51 name B options B value B
    51 name B options B value B
    51 name B options B value B
    51 name B options B value B
    52 name C options C value C
    52 name C options C value C

    I wish to auto increment each row in the increment column based on the value on the same row in the id column. Only incrementing +1 per row if the id is the same and then when the id changes, start back at 1 again. An example would look like this...

    id name options increment value
    50 name A options A 1 value A
    50 name A options A 2 value A
    50 name A options A 3 value A
    51 name B options B 1 value B
    51 name B options B 2 value B
    51 name B options B 3 value B
    51 name B options B 4 value B
    52 name C options C 1 value C
    52 name C options C 2 value C

    The number of rows with same value in the column id could vary and the amount of rows in the spreadsheet this is required for is 6302.

    Thanks in advance.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Auto increment each row based on value of another cell on same row

    Assuming that the first row contains column headers and the data starts from second row and the options are in column-c...

    In D2 Cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    03-13-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Auto increment each row based on value of another cell on same row

    Works perfectly, that looked simpler than I thought was possible. A great help, thanks very much
    Last edited by zigojacko; 04-16-2013 at 06:09 AM.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: Auto increment each row based on value of another cell on same row

    Glad it helps you and thanks for the feedback

    Please remove my quote from Post #3 since it's capturing our screen area unnecessarily and it's against forum rules too....

  5. #5
    Registered User
    Join Date
    04-01-2015
    Location
    Yangon
    MS-Off Ver
    2013
    Posts
    1

    Re: Auto increment each row based on value of another cell on same row

    Auto increment each row based on value of another cell on same row
    I have a spreadsheet formatted like the below...

    id name options increment value
    50 name A options A value A
    50 name A options A value A
    50 name A options A value A
    51 name B options B value B
    51 name B options B value B
    51 name B options B value B
    51 name B options B value B
    52 name C options C value C
    52 name C options C value C

    I wish to auto increment each row in the increment column based on the value on the same row in the id column. Only incrementing +1 per row if the id is the same and then when the id changes, start back at 1 again. An example would look like this...

    id name options increment value
    50 name A options A 1 value A
    50 name A options A 2 value A
    50 name A options A 3 value A
    51 name B options B 1 value B
    51 name B options B 2 value B
    51 name B options B 3 value B
    51 name B options B 4 value B
    52 name C options C 1 value C
    52 name C options C 2 value C

  6. #6
    Registered User
    Join Date
    08-25-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Auto increment each row based on value of another cell on same row

    =if(a2=a1,d1+1,1)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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