SOLVED

Referencing sheet names

Copper Contributor
I'm creating a workbook to keep track of football statistics. I have a sheet named for each team with their schedule at game stats on each one. Is there a way to use a cell's text/contents to refer to different pages? For example, if a cell says "Miami", it would automatically search the page which is also named "Miami". However, the next season they might be playing New York in week 1, in which case I would want it to search "New York" instead of "Miami". I know how to do this the long way by changing the formula, but since schedules change every season, I'm looking for a "one size fits all" solution.
2 Replies
best response confirmed by allyreckerman (Microsoft)
Solution

@WiiLoveZelda1987 

You can use the INDIRECT function for this.

Let's say you enter the name of a team in cell B3, and you want to return the value of cell D20 on the sheet whose name is in B3, you can use

=INDIRECT("'"&B3&"'!D20")

When you change the team name in B3, the formula will automatically look at the sheet for the new team.

It worked! Thanks a bunch! You have no idea how much time this was save me in the future. I really appreciate it!
1 best response

Accepted Solutions
best response confirmed by allyreckerman (Microsoft)
Solution

@WiiLoveZelda1987 

You can use the INDIRECT function for this.

Let's say you enter the name of a team in cell B3, and you want to return the value of cell D20 on the sheet whose name is in B3, you can use

=INDIRECT("'"&B3&"'!D20")

When you change the team name in B3, the formula will automatically look at the sheet for the new team.

View solution in original post