• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Name Range

Hi,


I'd like to know how can I name a range with vba code. When I recorded a macro doing this, i had just the R1C1 way, but I want to know how the regular way is suposed to be.


For ex: name "ABC" to the range B1:B11


ActiveWorkbook.Names.Add Name:="ABC", RefersToR1C1:= _

"=Sheets(1)!R1C2:R11C2"
 
Irisqueiroz


ActiveWorkbook.Names.Add Name:="Test", RefersTo:="=Sheet1!A1:A10"
 
Back
Top