Creating an Array of a players bowling scores

xgeek

New Member
Joined
Aug 1, 2023
Messages
5
Office Version
  1. 365
Platform
  1. MacOS
Hi Guys,

I have created a spreadsheet to log my families 10 pin bowling scores. I am having trouble creating an array of scores from a range based on the players name.
Below is an example of what I want to do. When I add a new game it will get inserted at B11in the first image and all other games move down 6 rows.

On the second image I want to select a name from the dropdown box (this works ok).
I then want to create an array of that players scores in the first sheet and insert them in to a column starting at AA8 in the second sheet based on the name selected in the dropdown box.

So using the example below, If I select Sophie in the dropdown box. I want it to search column B in the first sheet for a name match and then put all her scores in that row (starting with the last game in that row) into an array. The result I am after would look like column AA in the second image and the list below.

Many thanks in advance for any assistance or suggestions.

1690883973213.png


Screenshot 2023-08-01 at 10.39.09.jpg


Screenshot 2023-08-01 at 10.39.39.jpg
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi & welcome to MrExcel.
How about
Excel Formula:
=TOCOL(SORTBY(FILTER(Sheet1!C11:F100,Sheet1!B11:B100=D2),SEQUENCE(,4,4,-1)),1)
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=TOCOL(SORTBY(FILTER(Sheet1!C11:F100,Sheet1!B11:B100=D2),SEQUENCE(,4,4,-1)),1)[/
[/QUOTE]
Excel Formula:
=TOCOL(SORTBY(FILTER(Sheet1!C19:F100,Sheet1!B19:B100=D6),SEQUENCE(,4,4,-1)),1)

Many thanks it sort of works. I changed D2 to D6 as that is the cell with the players name in. When Sophie is selected the array data is correct with regards to the scores but also has 2 names added to the end:-
1690887305180.png


When I select my name in the dropbox box the score data is correct but this also gets added to the end of the array:-
1690887448275.png


It always seems to return 9 rows even if games played is less than 9. Also I added some dummy data to increase my amount of games to 12 and it only returned the last 9 game scores rather than all 12 scores.

It's so close but beyond me how to fix it.

Cheers
 
Upvote 0
In that case can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
I hope this helps. You can click B10 to select a players name.

Many thanks in advance.

Bowling Scores.xlsm
ABCDEFGHIJKLMNO
10Sophie
17ScoresThursday, 27 July 2023
18PlayersGame1 Game 2Game 3Game 4StrikesAvgSparesAvgGuttersAvgTotal PointsAvg per Game
19Sophie7574  115.501497574
20Roxy1009221.0031.50115.501929675
21Stephen8840   12864116
22Dummy4321   103121
23ScoresTuesday, 25 July 202366
24PlayersGame1 Game 2Game 3Game 4StrikesAvgSparesAvgGuttersAvgTotal PointsAvg per Game91
25Sophie66121116 41.33 30310193
26Emily759266 51.67 23378Stephen
27Stephen10283106 41.33 29197Sophie
28Dummy8765   267
29Thursday, 13 July 2023
30PlayersGame1 Game 2Game 3Game 4StrikesAvgSparesAvgGuttersAvgTotal PointsAvg per Game
31Emily8788   17588
32Sophie9391   18492
33Stephen73125   19899
34Dummy1211109   4211
Sheet1
Cell Formulas
RangeFormula
L19:L22,J31:J34,H31:H34,L31:L34,J25:J28,H25:H28,L25:L28,J19:J22,H19:H22L19=IF(K19>0,K19/COUNTA($C19:$F19),"")
M19:M22,M31:M34,M25:M28M19=IF(C19>0,SUM(C19:F19),"")
N19:N22,N31:N34,N25:N28N19=IF(C19>0,AVERAGE(C19:F19),"")
O19:O27O19=TOCOL(SORTBY(FILTER(Sheet1!C19:F100,Sheet1!B19:B100=B10),SEQUENCE(,4,4,-1)),1)
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C6:C10Cell Valuetop 1 valuestextNO
G6:G10Cell Valuetop 1 valuestextNO
H6:H10Cell Valuetop 1 valuestextNO
I6:I10Cell Valuetop 1 valuestextNO
J6:J10Cell Valuetop 1 valuestextNO
K6:K10Cell Valuetop 1 bottom valuestextNO
L6:L10Cell Valuetop 1 valuestextNO
M6:M10Cell Valuetop 1 valuestextNO
N6:N10Cell Valuetop 1 valuestextNO
 
Upvote 0
Thanks for that, delete all the formulae in col O & then re-enter the formula in O19 only & do not use Ctrl Shift Enter.
 
Upvote 0
Ok done that and now it goes over 9 games, but it still adds rogue data at the end of the column. If you change the player name in B10 to say Dummy it returns this:-

1690891262117.png


Any ideas?

Cheers
 
Upvote 0
Check that you don't have rogue data below row 34
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
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