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
 
Back
Top