Formula for column for (sort of) running count

devries1919

New Member
Joined
May 26, 2024
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hi,

Can anybody help me with the formula for the following:

I need sort of a running count:
Column A is the combination of the 1) the competition number and 2) the player number.
For each new competition number, I would like to have a new running count that start again at 1.
And for each new player number within that same competition number, the running count should be increased with 1.

Please see an example in the image attached.

With the formula for the results in either column D or column E I would be very happy.

Thank you for your feedback!


PS1 The result of this column, I am going to use in a sumproduct formula.
PS2 I tried to install the plugin for mini-sheets but this plugin option was greyed out (see attachment 2), sorry for that!
 

Attachments

  • MrExcel question.PNG
    MrExcel question.PNG
    31.1 KB · Views: 16
  • Mini-sheets greyed out.PNG
    Mini-sheets greyed out.PNG
    46.2 KB · Views: 15

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Since you're using older version of Excel, this is best I can come up with using a helper column B (Competition). Column C (player) isn't being used so you can remove.
Book1
ABCD
1
2CombinedCompetitionPlayerCount
3Competition 1 - Player 1Competition 1Player 11
4Competition 1 - Player 2Competition 1Player 22
5Competition 1 - Player 3Competition 1Player 33
6Competition 1 - Player 4Competition 1Player 44
7Competition 1 - Player 5Competition 1Player 55
8Competition 1 - Player 4Competition 1Player 4 
9Competition 1 - Player 5Competition 1Player 5 
10Competition 1 - Player 4Competition 1Player 4 
11Competition 1 - Player 5Competition 1Player 5 
12Competition 2 - Player 1Competition 2Player 11
13Competition 2 - Player 1Competition 2Player 1 
14Competition 2 - Player 1Competition 2Player 1 
15Competition 2 - Player 4Competition 2Player 42
16Competition 2 - Player 5Competition 2Player 53
17Competition 2 - Player 3Competition 2Player 34
18Competition 2 - Player 5Competition 2Player 5 
19Competition 2 - Player 4Competition 2Player 4 
20Competition 2 - Player 5Competition 2Player 5 
21Competition 1 - Player 4Competition 1Player 4 
22Competition 1 - Player 5Competition 1Player 5 
Sheet1
Cell Formulas
RangeFormula
B3:B22B3=TRIM(MID(A3,1,FIND("-",A3)-1))
C3:C22C3=TRIM(MID(A3,FIND("-",A3)+1,LEN(A3)))
D3:D22D3=IF(COUNTIFS($A$3:B3,A3)<>1,"",IF(COUNTIFS($B$3:B3,B3)=1,1,LOOKUP(2,1/ISNUMBER($D$2:D2),$D$2:D2)+1))
 
Upvote 0
If you wanted to do it without a helper column you could try these.

24 11 10.xlsm
ABC
1
2Combined
3Competition 1 - Player 111
4Competition 1 - Player 222
5Competition 1 - Player 333
6Competition 1 - Player 444
7Competition 1 - Player 555
8Competition 1 - Player 44 
9Competition 1 - Player 55 
10Competition 1 - Player 44 
11Competition 1 - Player 55 
12Competition 2 - Player 111
13Competition 2 - Player 11 
14Competition 2 - Player 11 
15Competition 2 - Player 422
16Competition 2 - Player 533
17Competition 2 - Player 344
18Competition 2 - Player 53 
19Competition 2 - Player 42 
20Competition 2 - Player 53 
21Competition 1 - Player 44 
22Competition 1 - Player 55 
Running Count
Cell Formulas
RangeFormula
B3:B22B3=IFERROR(IFNA(VLOOKUP(A3,A$2:B2,2,0),MAXIFS(B$2:B2,A$2:A2,LEFT(A3,FIND("-",A3))&"*")+1),1)
C3:C22C3=IF(COUNTIF(A$2:A2,A3),"",MAXIFS(C$2:C2,A$2:A2,LEFT(A3,FIND("-",A3))&"*")+1)



PS2 I tried to install the plugin for mini-sheets but this plugin option was greyed out
Go back to the installation instructions page and look at the 'Known XL2BB issues' section near the top, particularly the one labelled 'XL2BB Icons greyed out'
 
Upvote 0
Solution
Since you're using older version of Excel, this is best I can come up with using a helper column B (Competition). Column C (player) isn't being used so you can remove.
Just found a small error in the solution provided. In case I change for example row number 6 from "Competition 1 - Player 4" to "Competition 2 - Player 4", I noticed that the outcome switches to '1' (which is correct) but afterward that the next row switches to '2' which is incorrect. The solution provided from "Peter_SSs" did not have this issue and worked (and therefore I marked that one as the solution).

Many thanks to you both for the answers provided!
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,181
Members
452,615
Latest member
bogeys2birdies

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