+ Reply to Thread
Results 1 to 6 of 6

auto numbering rows based on changing values in another column

Hybrid View

kaj auto numbering rows based on... 05-03-2012, 09:19 AM
NBVC Re: auto numbering rows based... 05-03-2012, 09:33 AM
kaj Re: auto numbering rows based... 05-03-2012, 09:39 AM
arlu1201 Re: auto numbering rows based... 05-03-2012, 09:43 AM
kaj Re: auto numbering rows based... 05-03-2012, 09:44 AM
NBVC Re: auto numbering rows based... 05-03-2012, 09:49 AM
  1. #1
    Registered User
    Join Date
    05-03-2012
    Location
    Atlanta GA USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    auto numbering rows based on changing values in another column

    I have a list of items for multiple people (territories). I would like an Excel formula that would restart a row numbering sequence every time the territory number changes. The simple spreadsheet attached illustrates the results I would like to obtain.
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: auto numbering rows based on changing values in another column

    Try, in A2:

    =COUNTIF(B$2:B2,B2)

    copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-03-2012
    Location
    Atlanta GA USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: auto numbering rows based on changing values in another column

    Awesome! Thank you very much.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: auto numbering rows based on changing values in another column

    Another solution. Type 1 in A2. Then put this formula in A3 =IF(B2=B3,C2+1,1)

    Though NBVC's is better.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Registered User
    Join Date
    05-03-2012
    Location
    Atlanta GA USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: auto numbering rows based on changing values in another column

    Thank you for your response as well. It's nice to be able to learn from other's experiences and have other people willing to help.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: auto numbering rows based on changing values in another column

    Where would you put that formula, Arlu?.. if you place it in A2, copied down.. you get 1's only. If you put it in C2, you get a circular reference... at best, the alternative might be, in A2, =IF(B2<>B1,1,SUM(A1:A1)+1) copied down or the most efficient is to place a 1 in A2, then in A3: =IF(B3<>B2,1,A2+1) copied down
    Last edited by NBVC; 05-03-2012 at 09:53 AM.

+ 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