I have a cell in Excel for which I have assigned a variable name, this_cells_name
, to a cell, D2
, by using the Excel Name Box.
Here is an example of what the Excel Name Box is:
I want to be able to point to that cell and get the variable name as a return value.
I know how to do the following:
- use
=CELL("address",D2)
and get"$D$2"
as a return value, - use
=CELL("address",this_cells_name)
and get"$D$2"
as a return value.
I want to do the following:
- use
=some_function(D2)
and get"this_cells_name"
as a return value.
How can I do this? A VBA solution would be fine.