Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Names.Add - Range Syntax Issue
ActiveWorkbook.Names.Add Name:="TEST", RefersTo:=Columns(movs)
"Arturo" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Names.Add - Range Syntax Issue
ActiveWorkbook.Names.Add Name:="TEST", RefersTo:=Range("A1",Cells(
movs,100)) -- HTH RP (remove nothere from the email address if mailing direct) "Arturo" wrote in message ... 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Names.Add - Range Syntax Issue
The range's start point is A1 and needs to size to the column associated with
movs in the same row. I still do not see How to incorporate movs ActiveWorkbook.Names.Add Name:="TEST", RefersTo:=Range("A1:" & Columns(movs) & "1") Something is off with the R1C1 notation Arturo "Toppers" wrote: ActiveWorkbook.Names.Add Name:="TEST", RefersTo:=Columns(movs) "Arturo" wrote: 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Names.Add - Range Syntax Issue
Thank you both!
ActiveWorkbook.Names.Add Name:="TEST", RefersTo:=Range("A1", Cells(1, movs)) "Bob Phillips" wrote: ActiveWorkbook.Names.Add Name:="TEST", RefersTo:=Range("A1",Cells( movs,100)) -- HTH RP (remove nothere from the email address if mailing direct) "Arturo" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
converting email address names in a range of cells to real names | Excel Worksheet Functions | |||
help with the syntax for using range name in a formula? | Excel Discussion (Misc queries) | |||
Defined Names issue | Excel Discussion (Misc queries) | |||
COPYING FORMULA CONTAINING NAMES/RELATIVE RANGE NAMES | Excel Discussion (Misc queries) | |||
VBA: syntax to review macro names in a file? | Excel Discussion (Misc queries) |