Refering to Names

G

Guest

I need some help refering to Names having duplicate range name.

I have a worksheet1 in wb1 and A1 cell range name is "rng_Data" and I have
another worksheet2 in wb2 and its A1 cell range name is also "rng_Data". If I
move the worksheet2 into the wb1, then all the ranges also moved to the
workbook1.

Is there any way I can refers to range "rng_Data" of worksheet1 and
worksheet2 separately.?

If i look in the names I see two ranges one is rng_Data and other one is
rng_Data worksheet2.

Can somebody suggest me a way around?

Thanks in advance.
 
B

Bob Phillips

Debug.Print range("Sheet1!rng_Data").value

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

So long as you premise the range with the sheet then Excel will resolve the
name correctly...

Sheets("Sheet1").Select
Sheets("Sheet1").Range("rng_Data").Select
Sheets("Sheet2").Select
Sheets("Sheet2").Range("rng_Data").Select
 

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