Create numbering sequence within groups

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,366
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I'm currently using =IF(B1=B2,C1,MAX($C$1:C1)+1) in column C and it works fine to establish a sequential numbering, but not sure how to adjust for a new year.

Data Range
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[TD]
C​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]
Year​
[/TD]
[TD]
Team​
[/TD]
[TD]
Series​
[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
6​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
7​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
8​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
9​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
10​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
11​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
12​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
13​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team1​
[/TD]
[TD]
4​
[/TD]
[/TR]
[TR]
[TD]
14​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team1​
[/TD]
[TD]
4​
[/TD]
[/TR]
[TR]
[TD]
15​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
16​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
17​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
18​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
19​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
20​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
6​
[/TD]
[/TR]
[TR]
[TD]
21​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
6​
[/TD]
[/TR]
[TR]
[TD]
22​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
6​
[/TD]
[/TR]
[TR]
[TD]
23​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
6​
[/TD]
[/TR]
</tbody>[/TABLE]

Would like
Data Range
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A​
[/TD]
[TD]
B​
[/TD]
[TD]
C​
[/TD]
[/TR]
[TR]
[TD]
1​
[/TD]
[TD]
Year​
[/TD]
[TD]
Team​
[/TD]
[TD]
Series​
[/TD]
[/TR]
[TR]
[TD]
2​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
3​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
4​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
5​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
6​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
7​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
8​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
9​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
10​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
11​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
12​
[/TD]
[TD]
2018​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
13​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
14​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team1​
[/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
15​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
16​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
17​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
18​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
19​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team2​
[/TD]
[TD]
2​
[/TD]
[/TR]
[TR]
[TD]
20​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
21​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
22​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
23​
[/TD]
[TD]
2019​
[/TD]
[TD]
Team3​
[/TD]
[TD]
3​
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
That really complicates it a bit, and really is a question deserving of its own thread (instead of tacking on to an old, existing one posted by someone else).
You will get more people looking at it too, if it is in a new, unanswered thread.

Be sure to be detailed in your question, and include screen prints of the data, so people can see exactly what you are working with and what you would like to happen.


Thank you for your time. I have started a new thread as per your recommendation.
 
Upvote 0

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top