ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Getting named range from a cell (https://www.excelbanter.com/excel-programming/320406-getting-named-range-cell.html)

Dandog

Getting named range from a cell
 
If cell A1 has a named range of "Cell.Testname" what code can I use to put
this name into a VBA variable. I can only pull through the actual cell
co-ordinates and it is frustrating the hell out of me!!!!

Norman Jones

Getting named range from a cell
 

Hi Dandog,

Try:

Var = Range("A1").Name.Name


---
Regards,
Norman



"Dandog" wrote in message
...
If cell A1 has a named range of "Cell.Testname" what code can I use to put
this name into a VBA variable. I can only pull through the actual cell
co-ordinates and it is frustrating the hell out of me!!!!




Dandog

Getting named range from a cell
 
Why is it the simple ones that can trip us up!!

Perfect outcome with this - thanks

"Norman Jones" wrote:


Hi Dandog,

Try:

Var = Range("A1").Name.Name


---
Regards,
Norman



"Dandog" wrote in message
...
If cell A1 has a named range of "Cell.Testname" what code can I use to put
this name into a VBA variable. I can only pull through the actual cell
co-ordinates and it is frustrating the hell out of me!!!!






All times are GMT +1. The time now is 12:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com