Duplicate Range names

J

Jim

Suppose I have Sheet1 containing a named range, "Something". If I copy to a
new sheet (Edit | Move or Copy Sheet), the new sheet also contains
"Something", and I can reference either one (Sheet1.Something or
Sheet2.Something). So far so good.

Now, I need to programmatically create multiple sheets, each of which
contains "Something". How would I define Something on each sheet?

TIA,
Jim
 
B

Bob Phillips

With Worksheets("sheetname")
.Range("A1:A10").Name = "'" & .Name & "'!Something"
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

Jim

Works great. Thanks.

Bob Phillips said:
With Worksheets("sheetname")
.Range("A1:A10").Name = "'" & .Name & "'!Something"
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)
 

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