multifidus
New Member
- Joined
- Feb 2, 2023
- Messages
- 14
- Office Version
- 365
- Platform
- MacOS
I am building an NBA stat tracking model. As a part of it I am pulling data from each player's Basketball Reference page (each player has their own sheet that is getting data through a query) for the example I am linking to, the player's name is Saddiq Bey (sheet name Bey_Saddiq). Based on that data, I have a separate sheet (sheet name is Points) that auto-updates the value of a stat (Points in this example) in the previous 15 games with Column C representing the most recent game, Column D the second most recent game, etc.
The final sheet (sheet name is PointsOU) has the current vegas line for the specific stat of that player and counts how many times that player has gone over or under that number (Columns E and H have the stat line from two different books). Beginning at column R I have columns for the last 3 games, last 5 games, last 10 games, and last 15 games. The main issue I am having is that as the basketball reference page for a player gets longer and longer the data query sheet will occasionally duplicate the column headers. So when I try to pull the stat number for a cell that is the column header I get text (PTS) instead of a number value. Then, when I try to count the number of times a player has been over or under a value and the text is in one of cells that I am counting the entire formula returns a blank.
Any idea of how to skip the cells with PTS? Ideally, if I was checking the previous 3, 5, 10, or 15 games and PTS was in one of the cells, then the formula would actually SKIP this cell and count an additional cell (since the PTS is actually not a game).
Here is a sample sheet: Example.xlsx
Thank you!
The final sheet (sheet name is PointsOU) has the current vegas line for the specific stat of that player and counts how many times that player has gone over or under that number (Columns E and H have the stat line from two different books). Beginning at column R I have columns for the last 3 games, last 5 games, last 10 games, and last 15 games. The main issue I am having is that as the basketball reference page for a player gets longer and longer the data query sheet will occasionally duplicate the column headers. So when I try to pull the stat number for a cell that is the column header I get text (PTS) instead of a number value. Then, when I try to count the number of times a player has been over or under a value and the text is in one of cells that I am counting the entire formula returns a blank.
Any idea of how to skip the cells with PTS? Ideally, if I was checking the previous 3, 5, 10, or 15 games and PTS was in one of the cells, then the formula would actually SKIP this cell and count an additional cell (since the PTS is actually not a game).
Here is a sample sheet: Example.xlsx
Thank you!