Hi everyone!
I'm creating a spreadsheet to track points for a hockey league and have a Rank table which shows calculations of each of the players. I'm trying to automate it as much as possible (because I'm lazy) but I've run into a problem with regards to my Named Range VLOOKUP.
I've created a table which references the sheet names (A) and a range within that sheet (B), which automatically gets adjusted when new entries are created. Here's an example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]_13[/TD]
[TD]=A1&"!$B$2:$B"&COUNTA(INDIRECT(A1&"!A:A"))-1[/TD]
[TD]=INDIRECT($B$1)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]_12[/TD]
[TD]=A2&"!$B$2:$B"&COUNTA(INDIRECT(A2&"!A:A"))-1[/TD]
[TD]=INDIRECT($B$2)[/TD]
[/TR]
</tbody>[/TABLE]
Column A contains the name of the Named Range in the Name Manager.
Column B contains the formula for the Named Range.
Column C contains the formula in the Name Manager.
I've got a cell which is named statyear and contains _13. What I want to be able to do is change the statyear to _12, or _11, etc. and have my VLOOKUP use the range specified in B1, B2, etc. as per that Named Range.
Here's an example of the formula I want to use: VLOOKUP("Sidney Crosby",statyear,COLUMN(B$1),FALSE)
How do I get the statyear (_13) to look in that named range (_13) without having to enter _13 in place of statyear? I've tried a number of INDIRECT combinations but can't seem to get it to work. Any suggestions are welcomed.
This makes sense to me as I'm typing it but it may be confusing to the readers so please ask any questions and I'll help clarify when needed.
I'm creating a spreadsheet to track points for a hockey league and have a Rank table which shows calculations of each of the players. I'm trying to automate it as much as possible (because I'm lazy) but I've run into a problem with regards to my Named Range VLOOKUP.
I've created a table which references the sheet names (A) and a range within that sheet (B), which automatically gets adjusted when new entries are created. Here's an example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]_13[/TD]
[TD]=A1&"!$B$2:$B"&COUNTA(INDIRECT(A1&"!A:A"))-1[/TD]
[TD]=INDIRECT($B$1)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]_12[/TD]
[TD]=A2&"!$B$2:$B"&COUNTA(INDIRECT(A2&"!A:A"))-1[/TD]
[TD]=INDIRECT($B$2)[/TD]
[/TR]
</tbody>[/TABLE]
Column A contains the name of the Named Range in the Name Manager.
Column B contains the formula for the Named Range.
Column C contains the formula in the Name Manager.
I've got a cell which is named statyear and contains _13. What I want to be able to do is change the statyear to _12, or _11, etc. and have my VLOOKUP use the range specified in B1, B2, etc. as per that Named Range.
Here's an example of the formula I want to use: VLOOKUP("Sidney Crosby",statyear,COLUMN(B$1),FALSE)
How do I get the statyear (_13) to look in that named range (_13) without having to enter _13 in place of statyear? I've tried a number of INDIRECT combinations but can't seem to get it to work. Any suggestions are welcomed.
This makes sense to me as I'm typing it but it may be confusing to the readers so please ask any questions and I'll help clarify when needed.