Gathering Date Question

dgoodrid

New Member
Joined
May 17, 2010
Messages
17
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi All,

So i have an excel sheet that has lots of different Columns and Rows (lol) with Mixed Data or Letter and Letter and Numbers, Now i know how to split a cells data containing multiple words in split via a , or space for example - Not a problem but as some fields have more data in them thatn other the results of the split are different for each line, What my ask is and i think its a long show, is there a way i can have a list of Names in 1 Column, then in the other columns search the data in the table and reporting back the information

In the Example show,

Under Pld count how many times PlayerA, PlayerN etc.. show in the Played Column
Under Gla count how many times PlayerA, PlayerN etc.. show in the Goals Column - And if Possible count and Additional Numbers after the name
Under *** count how many times PlayerA, PlayerN etc.. show in the Assist Column - And if Possible count and Additional Numbers after the name
Under Pld count how many times PlayerA, PlayerN etc.. show in the Played Column - And if Possible count and Additional Numbers after the name

So it sort of looks like this

Hope this makes sence

1692714920696.png
1692714937683.png
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I don't know what version of excel you have - it's kind of important here. I can't do the "If Possible" part easily if you have older excel. But it works nice in 365:

MrExcelPlayground20.xlsx
ABCDEFGHIJ
1Old excel - I can't count multi-goals in one game
2PlayedGoalsAssistConcededPlayerPldGls***Con
3PlayerA,PlayerB,PlayerCPlayerA 2,PlayerBPlayerDPlayerZ 2PlayerA3120
4PlayerA,PlayerD,PlayerFPlayerC,PlayerGPlayerA,PlayerRPlayerB2200
5PlayerA,PlayerB,PlayerCPlayerH 3,PlayerB 2PlayerAA 2PlayerZ 1PlayerC2100
6PlayerD1010
7PlayerE0000
8PlayerF1000
9PlayerG0100
10PlayerH0100
11PlayerAA0010
12PlayerZ0002
13
14Excel 365
15PlayerPldGls***Con
16PlayerA3210
17PlayerB2300
18PlayerC2100
19PlayerD1010
20PlayerE0000
21PlayerF1000
22PlayerG0100
23PlayerH0300
24PlayerAA0020
25PlayerZ0003
Sheet4
Cell Formulas
RangeFormula
G3:J12,G16:G25G3=SUM(--ISNUMBER(SEARCH($F3,A$3:A$5)))
H16:J25H16=LET(y,$F16,z,B$3:B$5,a,DROP(TEXTSPLIT(CONCAT(z&","),,","),-1),b,VALUE(RIGHT(a,2)),c,IFERROR(b,1),d,IF(ISERR(b),a,TRIM(LEFT(a,LEN(a)-2))),e,IFERROR(SUM(FILTER(c,d=y)),0),e)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
This seems okay - except where a players name is wholly contained within another player's name - like PlayerA and PlayerAA. That maybe isn't a problem in real usage.

MrExcelPlayground20.xlsx
ABCDEFGHIJ
2PlayedGoalsAssistConcededPlayerPldGls***Con
3PlayerA,PlayerB,PlayerCPlayerA 2,PlayerBPlayerDPlayerZ 2PlayerA3220
4PlayerA,PlayerD,PlayerFPlayerC,PlayerGPlayerA,PlayerRPlayerB2300
5PlayerA,PlayerB,PlayerCPlayerH 3,PlayerB 2PlayerAA 2PlayerZ 1PlayerC2100
6PlayerD1010
7PlayerE0000
8PlayerF1000
9PlayerG0100
10PlayerH0300
11PlayerAA0020
12PlayerZ0003
Sheet4
Cell Formulas
RangeFormula
G3:G12G3=SUM(--ISNUMBER(SEARCH($F3,A$3:A$5)))
H3:J12H3=SUM(IF(ISERR(SEARCH($F3,B$3:B$5)),0,IFERROR(VALUE(MID(B$3:B$5,SEARCH($F3,B$3:B$5)+LEN($F3),2)),1)))
 
Upvote 0
No Your right wont happen in real life, thanks, ill give this a go and let you know, thanks in advance
 
Upvote 0
This seems okay - except where a players name is wholly contained within another player's name - like PlayerA and PlayerAA. That maybe isn't a problem in real usage.

MrExcelPlayground20.xlsx
ABCDEFGHIJ
2PlayedGoalsAssistConcededPlayerPldGls***Con
3PlayerA,PlayerB,PlayerCPlayerA 2,PlayerBPlayerDPlayerZ 2PlayerA3220
4PlayerA,PlayerD,PlayerFPlayerC,PlayerGPlayerA,PlayerRPlayerB2300
5PlayerA,PlayerB,PlayerCPlayerH 3,PlayerB 2PlayerAA 2PlayerZ 1PlayerC2100
6PlayerD1010
7PlayerE0000
8PlayerF1000
9PlayerG0100
10PlayerH0300
11PlayerAA0020
12PlayerZ0003
Sheet4
Cell Formulas
RangeFormula
G3:G12G3=SUM(--ISNUMBER(SEARCH($F3,A$3:A$5)))
H3:J12H3=SUM(IF(ISERR(SEARCH($F3,B$3:B$5)),0,IFERROR(VALUE(MID(B$3:B$5,SEARCH($F3,B$3:B$5)+LEN($F3),2)),1)))
Works Perfectly, Thank you sooo Much, will safe me crap loads of time getting the stats for my Grassrouts football team, thank you again :)
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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