When stuck, use the macro recorder to do what you want and peek at the code.
ActiveWorkbook.Names.Add Name:="test", RefersToR1C1:="=Sheet1!R1C1:R5C1"
that is created when i name it, when i change it
ActiveWorkbook.Names.Add Name:="test", RefersToR1C1:="=Sheet1!R1C1:R6C1"
so you just need to add using the same name and change the reference.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.
"Keith" wrote:
> Ok...this probibly has a very simple solution but how do you change
> the name of a data range? For example...say I have a range of cells A1
> through A5 named "test". How can i change that to include cell A6 and
> still keep the name of the range "test"? I can't figure it out.
>
> Thanks,
> Keith
>
|