![]() |
Refering to multiple tables
I have 5 tables in a workbook. The user selects a table from a drop-down box.
I then want a list to appear that refers to a column from the table he selected. How do I tell a cell to refer to table row X where the table name itself is given in a cell? -- Oxfordshire, UK |
Refering to multiple tables
Without more details, this won't totally answer your question, but it should
give you enough. I have a cell with a Sheet name in it, the data always changes so i never know which sheet to look on. A6 contains the sheetname in this example, the indirect function tells it to use what is in the cell. Hope this helps =VLOOKUP($A6,INDIRECT("'"&$A6&"'!$A$2:$D$25"),2,0) -- -John Please rate when your question is answered to help us and others know what is helpful. "Broadband Al" wrote: I have 5 tables in a workbook. The user selects a table from a drop-down box. I then want a list to appear that refers to a column from the table he selected. How do I tell a cell to refer to table row X where the table name itself is given in a cell? -- Oxfordshire, UK |
Refering to multiple tables
Halelujah! All these years programming Excel and I had never come across
"indirect". That's exactly what I needed. Thanks a lot! -- Oxfordshire, UK "John Bundy" wrote: Without more details, this won't totally answer your question, but it should give you enough. I have a cell with a Sheet name in it, the data always changes so i never know which sheet to look on. A6 contains the sheetname in this example, the indirect function tells it to use what is in the cell. Hope this helps =VLOOKUP($A6,INDIRECT("'"&$A6&"'!$A$2:$D$25"),2,0) -- -John Please rate when your question is answered to help us and others know what is helpful. "Broadband Al" wrote: I have 5 tables in a workbook. The user selects a table from a drop-down box. I then want a list to appear that refers to a column from the table he selected. How do I tell a cell to refer to table row X where the table name itself is given in a cell? -- Oxfordshire, UK |
All times are GMT +1. The time now is 04:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com