Dynamically reference a Named Table Column via cell content in Excel
- by rcphq
How do I reference an Excel Table column dynamically in Excel 2007?
ie: i wanna reference a named column of a named table and what table it is will vary with the value of a cell.
I have a Table in Excel (Let's call it Table1). I want to reference one of its columns (Let's call it column1) dynamically from a value in another cell (A1) so that I can achieve the following result:
When I change A1, the formula that counts Table1[DynamicallyReferencedColumnName] gets updated to the new reference.
I tried using =Count(Table1[INDIRECT("$A$1")]) but Excel says the formula contains an error.
Example:
A1 = names then the formula would equal Count(Table1[names]).
A1 = lastname then the formula would equal Count(Table1[lastname]).