Count the occurrence of a variable

bmv505

New Member
Joined
Sep 28, 2022
Messages
24
Office Version
  1. 365
I have a spreadsheet of football scoring plays. I want to number the scores by team.

Column A is the year (the spreadsheet has a few decades of scoring plays)
Column B is the game number of the year in Column A
Column C is the team scoring (L is one team, O is the opponent, while Game shows when a game starts and ends)

In column D, I numbered the scoring play. So D3 was L's first score, then D5 is the second, D6 is the third. I need a formula to do this automatically please!

1718967025408.png
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Maybe:

20240621 CountIfs by Row bmv505.xlsx
ABCD
1YearGamL/O/Result
220231Game-
320231L1
420231O1
520231L2
620231L3
720231O2
820231L4
920231L5
1020231L6
1120231O3
1220231Game-
1320232Game-
1420232L1
1520232O1
1620232L2
1720232O2
1820232O3
1920232L3
2020232O4
2120232O5
2220232L4
2320232O6
2420232L5
Sheet1
Cell Formulas
RangeFormula
D2:D24D2=IF(C2="Game","-",COUNTIFS($A$2:A2,A2,$B$2:B2,B2,$C$2:C2,C2))
 
Upvote 0

Forum statistics

Threads
1,224,821
Messages
6,181,163
Members
453,021
Latest member
Justyna P

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