Generate a table of Win, Loss, Tie results from a separate table of numerical results.

HockeyBoi

New Member
Joined
May 21, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
So I had some great help from a user the other day, and I'm hoping to take it a step further.

I'd like to be able to input the results of sports matches into the table on the left, and have the table on the right generate a "W", "L", or "T" for that particular team. I've written a bit of code that will easily do this, but I can't apply it across the table without doing it manually for each individual cell and each individual team.

Here's what I've written:
=IF(OR(ISBLANK(C3), ISBLANK(D3)), "", IF(C3 > D3, "W", IF(C3 < D3, "L", "T")))

Is there a better/easier way to apply this across the matches?

Example.xlsx
BCDEFGHIJK
2Game 1Game 2Game 3Game 4
3Team 1Team 2Team 1
4Team 3Team 4Team 2
5Team 5Team 6Team 3
6Team 7Team 8Team 4
7Team 9Team 10Team 5
8Team 11Team 12Team 6
9Team 2Team 1Team 7
10Team 13Team 8Team 8
11Team 10Team 7Team 9
12Team 14Team 4Team 10
13Team 6Team 3Team 11
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B3:E13Cell Valuecontains "Jets"textNO
B3:E13Cell Valuecontains "Bucks"textNO
B3:E13Cell Valuecontains "Lignu"textNO
B3:E13Cell Valuecontains "Bulls"textNO
B3:E13Cell Valuecontains "OPS Beasts 2.0"textNO
B3:E13Cell Valuecontains "Emersons Steamers"textNO
B3:E13Cell Valuecontains "Pro Flow Falcons"textNO
B3:E13Cell Valuecontains "Bombers"textNO
B3:E13Cell Valuecontains "Kinoko Beavers"textNO
B3:E13Cell Valuecontains "Chargers"textNO
B3:E13Cell Valuecontains "Darkest Dunedin Ducks"textNO
B3:E13Cell Valuecontains "Aotea Amps"textNO
B3:E13Cell Valuecontains "Rams"textNO
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Is this what you're looking for?
Book1
BCDEFGHIJK
1Game 1Game 2Game 3Game 4
2Team 1WLTeam 2Team 1WW
3Team 3LWTeam 4Team 2LL
4Team 5WLTeam 6Team 3LL
5Team 7LWTeam 8Team 4WW
6Team 9WLTeam 10Team 5W
7Team 11WLTeam 12Team 6LW
8Team 2LWTeam 1Team 7LW
9Team 13WLTeam 8Team 8WL
10Team 10LWTeam 7Team 9W
11Team 14LWTeam 4Team 10LL
12Team 6WLTeam 3Team 11W
Sheet2
Cell Formulas
RangeFormula
H11:I11,H7:I9,H6,H10,H12,H2:I5H2=TOROW(IF(G2=$B$2:$B$12,$C$2:$C$12,IF($E$2:$E$12=G2,$D$2:$D$12,NA())),2)
Dynamic array formulas.
 
Upvote 0
If your data are numbers then try this.
Book1
BCDEFGHIJK
1Game 1Game 2Game 3Game 4
2Team 189Team 2Team 1LL
3Team 381Team 4Team 2WW
4Team 531Team 6Team 3WW
5Team 767Team 8Team 4LL
6Team 927Team 10Team 5W
7Team 1122Team 12Team 6LL
8Team 272Team 1Team 7LW
9Team 1351Team 8Team 8WL
10Team 10410Team 7Team 9L
11Team 1493Team 4Team 10WL
12Team 6610Team 3Team 11T
Sheet2
Cell Formulas
RangeFormula
H11:I11,H7:I9,H6,H10,H12,H2:I5H2=LET( t,IF($C$2:$C$12>$D$2:$D$12,"W",IF($C$2:$C$12<$D$2:$D$12,"L","T")), tt,IF(t="W","L",IF(t="L","W","T")), TOROW(IF($B$2:$B$12=G2,t,IFS($E$2:$E$12=G2,tt)),2))
Dynamic array formulas.
 
Upvote 0
Hi

Cubist's method is definitely going to work

Please find an alternate method, which is slightly easier to decipher, but has an intermediate step

This involves finding the combo of Team-Game no combo - eg: Team 1 Game 1, Team 2 Game 1 etc and assigning, W (Win), Loss (L) and Tie (T) to these
These are depicted in col F to M

A vlookup of this combo will yield the result- in col O to S

Book2
ABCDEFGHIJKLMNOPQRS
1Game NoConcatResultGame NoConcatGame 1Game 2Game 3Game 4
2Team 110Team 2Team 11Team 1 Game 1WTeam 21Team 2 Game 1LTeam 1WWWT
3Team 312Team 4Team 31Team 3 Game 1LTeam 41Team 4 Game 1WTeam 2LLLNP
4Team 522Team 6Team 51Team 5 Game 1TTeam 61Team 6 Game 1TTeam 3LWNPNP
5Team 201Team 1Team 22Team 2 Game 2LTeam 12Team 1 Game 2W
6Team 201Team 3Team 23Team 2 Game 3LTeam 32Team 3 Game 2W
7Team 401Team 1Team 42Team 4 Game 2LTeam 13Team 1 Game 3W
8Team 111Team 3Team 14Team 1 Game 4TTeam 3Team 3 Game T
Sheet1
Cell Formulas
RangeFormula
F2:F8F2=A2
G2:G8G2=COUNTIF(F$2:F2,F2)+COUNTIF(J$2:J2,F2)
H2:H8,L2:L8H2=F2&" "&"Game "&G2
I2:I8I2=IF(OR(ISBLANK(B2),ISBLANK(C2)),"",IF(B2>C2,"W",IF(B2<C2,"L","T")))
J2:J8J2=D2
K2:K7K2=COUNTIF(J$2:J2,J2)+COUNTIF(F$2:F2,J2)
M2:M8M2=IF(OR(ISBLANK(B2),ISBLANK(C2)),"",IF(B2>C2,"L",IF(B2<C2,"W","T")))
P2:S4P2=IFERROR(VLOOKUP($O2&" "&P$1,$H:$I,2,0),IFERROR(VLOOKUP($O2&" "&P$1,$L:$M,2,0),"NP"))
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

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