![]() |
|
#1
|
||||
|
||||
|
I am certain that there are some statistically minded hockey fans out there that know how to do this so figured I would ask here first.
I am using Google Spreadsheets to track Stats from various leagues and I currently have a spreadsheet with a list of names of players and stats. On a second sheet I want to create 'teams' of players that would pull their stats from the first Sheet. For example on Sheet 2 I might have ... Nugent-Hopkins, Ryan Eberle, Jordan Atkinson, Cam On Sheet one I have all of their stats and I want to pull them into the second sheet based on the name. How would I do this? I am sure it's easy enough but I hardly ever use spreadsheets in my current job. |
|
#2
|
||||
|
||||
|
vlookup is your hookup!
=vlookup(cell containing the name of the player your want to look up the stats for, range of cells you want to search in with the player name being the first column, number of the column you want to be outputted, FALSE) For example, you have the players on your "stat" sheet, called "stats".
On your "lookup sheet", you'd put the player name in column A. Say you're on row 2. For column B (where you want to output GP for the player in question) you'd input "=vlookup(A2, 'Stats'!$A$2:$D$100, 2, false)". For column C, where you want P, it would be "=vlookup(A2, 'Stats'!$A$2:$D$100, 3, false)" Hope that makes sense? Probably doesn't.
|
|
#3
|
||||
|
||||
|
How did I know you would be the one to answer?!
I am going to go try this right now and see if I can get it to work. Will report back. Thanks! |
|
#4
|
||||
|
||||
|
It may take some practice getting used to. I've been using vlookup for years and still stumble with it at times.
__________________
UHL Calgary Flames 24-team H2H (roto G, A, GWG, SHP, PPP, PIM, +/, SOG, Hits, Blks, FOW, W, SV, SV%, GAA, SO) Capped article archive Montreal Canadiens coverage Twitter:@DH_EricDaoust. |
|
#5
|
||||
|
||||
|
I may have hit a snag in that since I am using importxml to grab the data it doesn't have the correct values in my 'stats' page.
|
|
#6
|
||||
|
||||
|
You want to make sure all your "data" is in number form and not text form. I also find that if the names dont match exactly it wont work either.
__________________
Derek Reese - Future Hall of Famer Studs N Duds - Sunday's 12 Team NHL Salary Cap Dynasty H2H, Salary Cap 82mil, Player actual salaries G,A,PTS,GWG,PIM,SOG,STP,HT,BL,+/-,W,GAA,SV,SO Starters: 12 Forwards, 6 Defense, 2 Goalies F - Stamkos, Perry, E.Staal, Voracek, J.Staal, Simmonds, Ott, Downie, J.Jokinen, Eller, Nielson, Prust D - Martin, Faulk, Brodie, Ellerby, M.Weber, Stone G - Bobrovsky, Halak Bench - Brunner, Brodie, Strachan, Khudobin, Lindback, Neuvirth, Ramo Prospects - Calvert, Forsberg, Etem, Namestinikov, Kreider, Cundari |
|
#7
|
||||
|
||||
|
Sure, but that shouldn't impact your ability to figure out how to look them up. Just start with dummy stats to begin with, get the lookup right, then get the stats in there.
|
|
#8
|
||||
|
||||
|
The syntax for the vlookup seems pretty straightforward but I think it won't work the way I have grabbed my data. I am using importxml to snag it from the AHL website for testing purposes, and so the value of the cells in the Stats sheet are not names, but are something else.
|
|
#9
|
||||
|
||||
|
Quote:
__________________
UHL Calgary Flames 24-team H2H (roto G, A, GWG, SHP, PPP, PIM, +/, SOG, Hits, Blks, FOW, W, SV, SV%, GAA, SO) Capped article archive Montreal Canadiens coverage Twitter:@DH_EricDaoust. |
|
#10
|
||||
|
||||
|
Quote:
I never use spreadsheets so it's probably something silly...hahah. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|