May 11 2022 07:49 AM
Hi all!
I wonder if it is possible to write down the name of a table column in a cell (for instance Table3[Time passed] in cell B3) and use that as an input in a function. This should look like this:
=ADDRESS(ROW(=B3),COLUMN(=B3))
instead of
=ADDRESS(ROW(Table3[Time passed]),COLUMN(Table3[Time passed]))
I use the same table name a lot in several functions, some much longer than this one. I also want to vary the input of these function for different columns more easily (so Table3[Time passed] and Table3[Temperature]), and changing the name of the table as input in the functions is very cumbersome and prone to mistakes. Is there a way that I can take the value of the cell as cell in a function? This function it gives me the address of B3, instead of the address of Table3[Time passed]
I hope to hear from you!
May 11 2022 08:39 AM - edited May 11 2022 08:39 AM
SolutionYou could use the INDIRECT function for this:
=ADDRESS(ROW(INDIRECT(B3)),COLUMN(INDIRECT(B3)))
Warning: in Excel in Microsoft 365 and Office 2021, this returns a dynamic array with the addresses of all cells in Table3[Time Passed].
May 12 2022 02:19 AM
Hans, do you have a version of Excel 365 with VSTACK?
If so, the attached file, though probably overcomplicated, is interesting that it returns a Table, or a specific field, specified by name, but without using the volatile function INDIRECT.
=Tableλ(tableName,fieldName)
May 12 2022 02:20 AM
Hi Peter, I have Office 2021, so no newfangled stuff <grin>
May 11 2022 08:39 AM - edited May 11 2022 08:39 AM
SolutionYou could use the INDIRECT function for this:
=ADDRESS(ROW(INDIRECT(B3)),COLUMN(INDIRECT(B3)))
Warning: in Excel in Microsoft 365 and Office 2021, this returns a dynamic array with the addresses of all cells in Table3[Time Passed].