View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
gocush[_28_] gocush[_28_] is offline
external usenet poster
 
Posts: 42
Default Excel macro to insert names for ranges, not always the same size..

ActiveWorkbook.Names.Add Name:="MyRange1", RefersToR1C1:= _
"=Sheet1!R2C1:R2C21"

will insert the name: MyRange1
and will refer to the cells A2:U2


"Ocicat" wrote:

I need an Exel macro to insert names for ranges, not always the same size.
They always start in Colunn A and end in Column U.