Changing Reference Dynamically

  • Thread starter Thread starter Shashi Bhosale
  • Start date Start date
S

Shashi Bhosale

Hi,

On my Data Worksheet, I have defined DataAmt as A1:A65000.
How can i change it to some other value ex. A1:A100 ?

Thanks in advance.
 
Shashi,

You can try the following:

Range(Range("A1"), Range("A65536").End(xlUp)).Name = "DataAmt"

The above will create a named range (DataAmt) from A1 to the last cell
in column "A" that contains a value (or text).

John
 

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

Back
Top