Create numbering sequence within groups

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,364
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
A​
B​
C​
1​
Year​
Team​
Series​
2​
2018​
Team1​
1​
3​
2018​
Team1​
1​
4​
2018​
Team1​
1​
5​
2018​
Team2​
2​
6​
2018​
Team2​
2​
7​
2018​
Team2​
2​
8​
2018​
Team2​
2​
9​
2018​
Team3​
3​
10​
2018​
Team3​
3​
11​
2018​
Team3​
3​
12​
2018​
Team3​
3​
13​
2019​
Team1​
4​
14​
2019​
Team1​
4​
15​
2019​
Team2​
5​
16​
2019​
Team2​
5​
17​
2019​
Team2​
5​
18​
2019​
Team2​
5​
19​
2019​
Team2​
5​
20​
2019​
Team3​
6​
21​
2019​
Team3​
6​
22​
2019​
Team3​
6​
23​
2019​
Team3​
6​

<tbody>
</tbody>

Would like
Data Range
A​
B​
C​
1​
Year​
Team​
Series​
2​
2018​
Team1​
1​
3​
2018​
Team1​
1​
4​
2018​
Team1​
1​
5​
2018​
Team2​
2​
6​
2018​
Team2​
2​
7​
2018​
Team2​
2​
8​
2018​
Team2​
2​
9​
2018​
Team3​
3​
10​
2018​
Team3​
3​
11​
2018​
Team3​
3​
12​
2018​
Team3​
3​
13​
2019​
Team1​
1​
14​
2019​
Team1​
1​
15​
2019​
Team2​
2​
16​
2019​
Team2​
2​
17​
2019​
Team2​
2​
18​
2019​
Team2​
2​
19​
2019​
Team2​
2​
20​
2019​
Team3​
3​
21​
2019​
Team3​
3​
22​
2019​
Team3​
3​
23​
2019​
Team3​
3​

<tbody>
</tbody>
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,216,085
Messages
6,128,733
Members
449,465
Latest member
TAKLAM

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