Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range reference
Hi! In my macro I have a named range. I want to refer to a certain cell
within the range (eg the one in the left corner). However I have some trouble with the syntax. ThisWorkbook.Names.Add Name:="FactorCorrRange", _ RefersTo:="=$i$1:$j$5", Visible:=True var = FactorCorrRange.Offset(1, 1).Text the program says Error 424 object required. Can someone pls help me? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range reference
Arne,
try it this way: ThisWorkbook.Names.Add Name:="FactorCorrRange", _ RefersTo:="=$i$1:$j$5", Visible:=True Var = Range("FactorCorrRange").Cells(1, 1).Value -- Hope that helps. Vergel Adriano "Arne Hegefors" wrote: Hi! In my macro I have a named range. I want to refer to a certain cell within the range (eg the one in the left corner). However I have some trouble with the syntax. ThisWorkbook.Names.Add Name:="FactorCorrRange", _ RefersTo:="=$i$1:$j$5", Visible:=True var = FactorCorrRange.Offset(1, 1).Text the program says Error 424 object required. Can someone pls help me? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range reference
Activesheet.Range("i1:j5").Name = "FactorCorrRange"
var = Range("FactorCorrRange")(1).value -- Regards, Tom Ogilvy "Arne Hegefors" wrote: Hi! In my macro I have a named range. I want to refer to a certain cell within the range (eg the one in the left corner). However I have some trouble with the syntax. ThisWorkbook.Names.Add Name:="FactorCorrRange", _ RefersTo:="=$i$1:$j$5", Visible:=True var = FactorCorrRange.Offset(1, 1).Text the program says Error 424 object required. Can someone pls help me? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatic range - named range give me circular reference... | Excel Discussion (Misc queries) | |||
VBA reference to 3D range | Excel Programming | |||
Can you get the range reference for each page in a worksheet print range? | Excel Programming | |||
adding reference-to-range control to excel range | Excel Programming | |||
Subscript out of Range on Range reference | Excel Programming |