Extract Name from Range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Range("a10") is named TEST

How can I extract the name given the range a10 using VBA?

Thanks in advance.
 
worksheets("Sheet1").Range("A10").Name.Name

It test has a refersto string like

=Sheet1!$A$10
 
I was able to find the answer using trial and error

To get the name for a range you must use the .name.name
extension for a range.

For example Range("a10") is named Test

To extract the name from a10 simply use Range("a10").Name.Name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top