View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arturo Arturo is offline
external usenet poster
 
Posts: 108
Default Names.Add - Range Syntax Issue

I have a variable that holds a number.
I have a start point for a named range that needs to go out the number of
columns based on that variable. The following works wonderfully for vertical
situations but I need that variable €śmovs€ť to denote the column not row.

movs = Sheets("WIP2").Range("I4").Value
ActiveWorkbook.Names.Add Name:="TEST", RefersTo:=Range("A1:A" & movs)

Spastic morning,
Arturo