Help with indexing data for multiple value returns

leehowardblair

New Member
Joined
Jul 18, 2011
Messages
9
So I have a bunch of sports stats data... I need to return the players name only 1 time, but with multiple "stat" categories for said player. So I have a macro that allows me to easily get a top 10 of "unique" player names. But then I need a few stats from that player. The problem is that the data comes in on separate rows and some players come in a multiple positions, but I only need the data once.

So here's the data feed:

Excel 2012
CDEFGHIJKLM
1FULL_NAMEfirstNamelastNamepositionscoresalaryteamStatIdNameAbbreviationFantasyPoints
2Alex LenAlexLenC9.305100Pho22ReboundsREB3.75
3Alex LenAlexLenC9.305100Pho253 Points Made3PM0
4Alex LenAlexLenC9.305100Pho27AssistsAST0
5Alex LenAlexLenC9.305100Pho28BlocksBLK0
6Alex LenAlexLenC9.305100Pho29StealsSTL0
7Alex LenAlexLenC9.305100Pho31TurnoversTO-0.5
8Alex LenAlexLenC9.305100Pho32PointsPTS6
9Alex LenAlexLenC9.305100Pho212Double DoubleDDbl0
10Alex LenAlexLenC9.305100Pho213Triple DoubleTDbl0
11Alex LenAlexLenUTIL9.305100Pho22ReboundsREB3.75
12Alex LenAlexLenUTIL9.305100Pho253 Points Made3PM0
13Alex LenAlexLenUTIL9.305100Pho27AssistsAST0
14Alex LenAlexLenUTIL9.305100Pho28BlocksBLK0
15Alex LenAlexLenUTIL9.305100Pho29StealsSTL0
16Alex LenAlexLenUTIL9.305100Pho31TurnoversTO-0.5
17Alex LenAlexLenUTIL9.305100Pho32PointsPTS6
18Alex LenAlexLenUTIL9.305100Pho212Double DoubleDDbl0
19Alex LenAlexLenUTIL9.305100Pho213Triple DoubleTDbl0
20Emmanuel MudiayEmmanuelMudiayPG8.305900Den22ReboundsREB1.25
21Emmanuel MudiayEmmanuelMudiayPG8.305900Den253 Points Made3PM0
22Emmanuel MudiayEmmanuelMudiayPG8.305900Den27AssistsAST4.5
23Emmanuel MudiayEmmanuelMudiayPG8.305900Den28BlocksBLK0
24Emmanuel MudiayEmmanuelMudiayPG8.305900Den29StealsSTL0
25Emmanuel MudiayEmmanuelMudiayPG8.305900Den31TurnoversTO-1.5
26Emmanuel MudiayEmmanuelMudiayPG8.305900Den32PointsPTS4
27Emmanuel MudiayEmmanuelMudiayPG8.305900Den212Double DoubleDDbl0
28Emmanuel MudiayEmmanuelMudiayPG8.305900Den213Triple DoubleTDbl0
29Emmanuel MudiayEmmanuelMudiayG8.305900Den22ReboundsREB1.25
30Emmanuel MudiayEmmanuelMudiayG8.305900Den253 Points Made3PM0
31Emmanuel MudiayEmmanuelMudiayG8.305900Den27AssistsAST4.5
32Emmanuel MudiayEmmanuelMudiayG8.305900Den28BlocksBLK0
33Emmanuel MudiayEmmanuelMudiayG8.305900Den29StealsSTL0
34Emmanuel MudiayEmmanuelMudiayG8.305900Den31TurnoversTO-1.5
35Emmanuel MudiayEmmanuelMudiayG8.305900Den32PointsPTS4
36Emmanuel MudiayEmmanuelMudiayG8.305900Den212Double DoubleDDbl0
37Emmanuel MudiayEmmanuelMudiayG8.305900Den213Triple DoubleTDbl0
38Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den22ReboundsREB1.25
39Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den253 Points Made3PM0
40Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den27AssistsAST4.5
41Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den28BlocksBLK0
42Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den29StealsSTL0
43Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den31TurnoversTO-1.5
44Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den32PointsPTS4
45Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den212Double DoubleDDbl0
46Emmanuel MudiayEmmanuelMudiayUTIL8.305900Den213Triple DoubleTDbl0
NBA_DATA
Cell Formulas
RangeFormula
C2=[@firstName]&" "&[@lastName]

So I need to return the player only once, regardless of his position and then a few stats (in order score leader), like
Excel 2012
QRSTUVW
1FULL_NAMEPOSITIONTEAMSCOREPTS3PMASSISTS
2Alex LenCPho9.3HELP???HELP???HELP???
3Emmanuel MudiayPGDen8.3HELP???HELP???HELP???
4C.J. McCollumSGPor6.8HELP???HELP???HELP???
5Noah VonlehPFPor6.5HELP???HELP???HELP???
6Leandro BarbosaPGPho5.3HELP???HELP???HELP???
7Lou WilliamsSGLAL5HELP???HELP???HELP???
8Allen CrabbeSGPor4.8HELP???HELP???HELP???
9Julius RandlePFLAL4HELP???HELP???HELP???
10Tyler UlisPGPho3.5HELP???HELP???HELP???
11Dragan BenderPFPho3.5HELP???HELP???HELP???

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
NBA_DATA

Worksheet Formulas
CellFormula
Q2=listUnique($C:$C)
R2=VLOOKUP($Q2,$C:$O,4,FALSE)
S2=VLOOKUP($Q2,$C:$O,7,FALSE)
T2=VLOOKUP($Q2,$C:$O,5,FALSE)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Thanks very much in advance - using excel to try to get what I need out of this xml feed.
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You can use sumifs or a pivot table.


Excel 2010
MNOPQRS
1FULL_NAMEPOSITIONTEAMSCOREPTS3PMASSISTS
2Alex LenCPho9.31200
3Emmanuel MudiayPGDen8.312013.5
4C.J. McCollumSGPor6.8000
5Noah VonlehPFPor6.5000
Sheet1
Cell Formulas
RangeFormula
Q2=SUMIFS($L$2:$L$46,$B$2:$B$46,M2,$J$2:$J$46,"Points")
R2=SUMIFS($L$2:$L$46,$B$2:$B$46,M2,$J$2:$J$46,"3 Points Made")
S2=SUMIFS($L$2:$L$46,$B$2:$B$46,M2,$J$2:$J$46,"Assists")
 
Upvote 0
You can use sumifs or a pivot table.

Excel 2010
MNOPQRS
1FULL_NAMEPOSITIONTEAMSCOREPTS3PMASSISTS
2Alex LenCPho9.31200
3Emmanuel MudiayPGDen8.312013.5
4C.J. McCollumSGPor6.8000
5Noah VonlehPFPor6.5000

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
Q2=SUMIFS($L$2:$L$46,$B$2:$B$46,M2,$J$2:$J$46,"Points")
R2=SUMIFS($L$2:$L$46,$B$2:$B$46,M2,$J$2:$J$46,"3 Points Made")
S2=SUMIFS($L$2:$L$46,$B$2:$B$46,M2,$J$2:$J$46,"Assists")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

This is working great and makes perfect sense... However, the feed shows a player at all possible positions and therefore the data is sometimes doubled or tripled. For example, Alex Len is listed as a C as well as UTIL, so it returns 12 points for him, in reality he only has 6. Is there a way to add an if clause maybe for this? Some players have 3 positons too.

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,634
Messages
6,125,931
Members
449,274
Latest member
mrcsbenson

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