Thread: naming ranges
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alexander Bogomolny Alexander Bogomolny is offline
external usenet poster
 
Posts: 7
Default naming ranges

Hello:

Is it possible to define range names local to a worksheet. In other
words, is it possible to have a range name that in different worksheets
refers to different ranges.

When done manually, it seems this is how Excel works. But when I created
a macro, there were no indication that a name is associated with a
particular worksheet. I.e., it does refer to a particular worksheet, but
when used in other worksheets gives exactly same value.

Say, I have worksheets Sheet1 and Sheet2. I'd like a variable w refer to
Sheet1!$A$1, if used in Sheet1, and to Sheet2!$B$1, if used in Sheet2.

Is this possible?

Thank you,
Alex