Change the Range of a Name

H

Hölzl Otto

Is There a possibility, to change the Range of a name-dependent of the value
of a Variable(perhaps Startrow rsp. Endrow)-with with a VBA-statement?
Thank you for a good hint!
 
D

Dave Peterson

dim Startrow as long
dim endrow as long

with activesheet
.range(.cells(startrow,"B"),.cells(endrow,"c")).name = "myName"
end with

if myName already exists, this'll reassign it. If it didn't exist, it'll get
created.

(Did I misunderstand the question?)
 

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

Top