SOLVED
Home

Indirect Function - Referencing Table Columns

%3CLINGO-SUB%20id%3D%22lingo-sub-772194%22%20slang%3D%22en-US%22%3EIndirect%20Function%20-%20Referencing%20Table%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-772194%22%20slang%3D%22en-US%22%3E%3CP%3EI%20know%20you%20can%20use%20the%20INDIRECT%20function%20to%20reference%20a%20cell%20from%20a%20different%20worksheet...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EINDIRECT(%22'%22%26amp%3Bsheet%26amp%3B%22'!%22%26amp%3Bname)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E...But%20I'm%20wondering%20if%20you%20can%20use%20it%20to%20reference%20a%20column%20heading%20in%20a%20named%20table%20from%20a%20different%20worksheet%3F%20I%20think%20the%20syntax%20would%20look%20something%20like%20this...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EINDIRECT(%22'%22%20%26amp%3B%20Table%20name%3F%20%26amp%3B%22'%20%26amp%3B%5BColumn%20name%5D)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E...%20Where%20the%20table%20name%20is%20text%20and%20the%20column%20name%20is%20a%20cell%20reference.%26nbsp%3B%20However%2C%26nbsp%3B%3CSPAN%3EI%20can't%20quite%20get%20it%20to%20work.%26nbsp%3B%20Any%20s%3C%2FSPAN%3Euggestions%2C%20internet%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-772194%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-772424%22%20slang%3D%22en-US%22%3ERe%3A%20Indirect%20Function%20-%20Referencing%20Table%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-772424%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F286940%22%20target%3D%22_blank%22%3E%40warrevar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20like%3C%2FP%3E%0A%3CPRE%3EINDIRECT(%20TableName%20%26amp%3B%20%22%5B%22%20%26amp%3B%20ColumnName%20%26amp%3B%20%22%5D%22)%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773486%22%20slang%3D%22en-US%22%3ERe%3A%20Indirect%20Function%20-%20Referencing%20Table%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773486%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3BThank%20you!%26nbsp%3B%20I%20also%20needed%20to%20put%20the%20name%20of%20the%20table%20in%20quotes%20so%20this%20ended%20up%20being%20the%20final%20syntax...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EINDIRECT(%20%22TableName%22%20%26amp%3B%20%22%5B%22%20%26amp%3B%20ColumnName%20%26amp%3B%20%22%5D%22)%26nbsp%3B%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-773580%22%20slang%3D%22en-US%22%3ERe%3A%20Indirect%20Function%20-%20Referencing%20Table%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-773580%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F286940%22%20target%3D%22_blank%22%3E%40warrevar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETableName%20and%20ColumnName%20could%20be%20references%20to%20cells%2C%20named%20cells%2C%20simply%20texts.%20If%20you%20consider%20first%20as%20text%20when%20INDIRECT(%22TableName%5B%22%20%26amp%3B%20ColumnName%20%26amp%3B%20%22%5D%22).%3C%2FP%3E%3C%2FLINGO-BODY%3E
warrevar
Occasional Contributor

I know you can use the INDIRECT function to reference a cell from a different worksheet...

 

INDIRECT("'"&sheet&"'!"&name)

 

...But I'm wondering if you can use it to reference a column heading in a named table from a different worksheet? I think the syntax would look something like this...

 

INDIRECT("'" & Table name? &"' &[Column name])

 

... Where the table name is text and the column name is a cell reference.  However, I can't quite get it to work.  Any suggestions, internet?  

 

3 Replies

@warrevar 

That's like

INDIRECT( TableName & "[" & ColumnName & "]")
Solution

@Sergei Baklan Thank you!  I also needed to put the name of the table in quotes so this ended up being the final syntax...

 

INDIRECT( "TableName" & "[" & ColumnName & "]") 

 

@warrevar 

TableName and ColumnName could be references to cells, named cells, simply texts. If you consider first as text when INDIRECT("TableName[" & ColumnName & "]").

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
PacketMon Components are not loading in WAC 1909
HotCakeX in Windows Admin Center on
2 Replies