Sheet not pulling data from tabs with names that have two words in them
I'm working on a statistical model for college basketball teams. I adapted it from a Google Sheet and decided to try Excel.
Each team is in its own tab, and the tabs are named for the teams themselves (Kansas, Oklahoma State, etc.).
I'm hitting a snag where the spreadsheet will pull data from team tabs that have one name (e.g. Kansas, Cincinnati) but not those with a space in the name (e.g. Oklahoma State). Instead I get a #REF! error. An image is below.
The formula in the fifth column from the left looks like this:
=IF(D23="D2","D2",INDEX('ALL TEAMS'!$P$2:$P$366,MATCH(B23,'ALL TEAMS'!$B$2:$B$366,0)))
What am I doing wrong here?
UPDATE from below reply:
Actually, no, It's not trying to reference sheet names. It's referencing names in a column on another sheet called "ALL TEAMS".
The problem I think is with the MATCH function. In the formula I provided, I'm asking it to find cell B23 in the ALL TEAMS tab. That column is where the team names are.
It's pulling the teams that have one word in their name, but not the teams that have more than one word.
Putting single quotes around B23 (e.g., 'B23') does not work. It spits a warning out at me about Excel thinking I'm writing a formula.
[link] [comments]
Want to read more?
Check out the full article on the original site