Score conversion

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
165
Office Version
  1. 365
Platform
  1. Windows
Have a spreadsheet with the following values. The values represent the scores during a game. In cell B2, 1.2 represents our score at quarter time, 4.5 at half time, 5.6 at 3 quarter time and 10.11 at the final siren. The first digit represents goals and are worth 6 points, the second digit represents behinds and are worth 1 point. The scores in B2 then equate to 8, 29, 36, 71. My aim is to find the difference in points between teams by quarter so in the first case it would be 12 (20 - 8), 0 (29 - 29), 7 (43-36), -9 (62 - 71). Formula/function approach is preferred but will take anything that works.
Book3
ABC
1OpponentOur ScoreTheir score
2Team A1.2 4.5 5.6 10.113.2 4.5 6.7 9.8
3Team B0.2 4.5 8.9 13.127.1 9.5 13.8 17.10
Sheet1
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
MrExcelPlayground20.xlsx
ABCDEFG
1OpponentOur ScoreTheir scorefirstsecondthirdfourth
2Team A1.2 4.5 5.6 10.113.2 4.5 6.7 9.81207-9
3Team B0.2 4.5 8.9 13.127.1 9.5 13.8 17.1041302922
Sheet6
Cell Formulas
RangeFormula
D2:G3D2=LET(x,B2,y,C2,a,VALUE(TEXTSPLIT(x,"."," ")),b,VALUE(TEXTSPLIT(y,"."," ")),c,TAKE(a,,1),cc,TAKE(a,,-1),ccc,6*c+cc,d,TAKE(b,,1),dd,TAKE(b,,-1),ddd,6*d+dd,TRANSPOSE(ddd-ccc))
Dynamic array formulas.
 
Upvote 0
How about
Fluff.xlsm
ABCD
1OpponentOur ScoreTheir score
2Team A1.2 4.5 5.6 10.113.2 4.5 6.7 9.812 0 7 -9
3Team B0.2 4.5 8.9 13.127.1 9.5 13.8 17.1041 30 29 22
Master
Cell Formulas
RangeFormula
D2:D3D2=TEXTJOIN(" ",,BYROW(TEXTSPLIT(C2,"."," ")*{6,1},LAMBDA(br,SUM(br)))-BYROW(TEXTSPLIT(B2,"."," ")*{6,1},LAMBDA(br,SUM(br))))


Or

Fluff.xlsm
ABCDEFG
1OpponentOur ScoreTheir score
2Team A1.2 4.5 5.6 10.113.2 4.5 6.7 9.81207-9
3Team B0.2 4.5 8.9 13.127.1 9.5 13.8 17.1041302922
Master
Cell Formulas
RangeFormula
D2:G3D2=TOROW(BYROW(TEXTSPLIT(C2,"."," ")*{6,1},LAMBDA(br,SUM(br)))-BYROW(TEXTSPLIT(B2,"."," ")*{6,1},LAMBDA(br,SUM(br))))
Dynamic array formulas.
 
Upvote 0
.. or this?

23 08 23.xlsm
ABCDEFG
1OpponentOur ScoreTheir scoreQ1Q2Q3Q4
2Team A1.2 4.5 5.6 10.113.2 4.5 6.7 9.81207-9
3Team B0.2 4.5 8.9 13.127.1 9.5 13.8 17.1041302922
4Team C7.1 9.5 13.8 17.100.2 4.5 8.9 13.12-41-30-29-22
AFL Scores
Cell Formulas
RangeFormula
D2:G4D2=LET(a,TEXTSPLIT(C2," "),h,TEXTSPLIT(B2," "),INT(a)*6+TEXTAFTER(a,".")-(INT(h)*6+TEXTAFTER(h,".")))
Dynamic array formulas.
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0
Another similar option:
Book1
ABCDEFG
1OpponentOur ScoreTheir score
2Team A1.2 4.5 5.6 10.113.2 4.5 6.7 9.81207-9
3Team B0.2 4.5 8.9 13.127.1 9.5 13.8 17.1041302922
Sheet1
Cell Formulas
RangeFormula
D2:G3D2=LET(ts,TEXTSPLIT(C2,"."," ")-TEXTSPLIT(B2,"."," "),TOROW(INDEX(ts,,1)*6+INDEX(ts,,2)))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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