Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a Named Range called VERSION, in which I update every time I make a
new version of the workbook. In my macro, I want to grab this value. ThisWorkbook.Names("VERSION").Value returns "=UPDATES!$D$16". How should I change that line to return the value which is Cell D16 on my UPDATES tab? -- TIA, Brad E. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brad,
To get the value use MyVar = ThisWorkbook.Names("Version").RefersToRange -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Brad E." wrote: I have a Named Range called VERSION, in which I update every time I make a new version of the workbook. In my macro, I want to grab this value. ThisWorkbook.Names("VERSION").Value returns "=UPDATES!$D$16". How should I change that line to return the value which is Cell D16 on my UPDATES tab? -- TIA, Brad E. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ThisWorkbook.Names("VERSION").RefersToRange
"Brad E." wrote: I have a Named Range called VERSION, in which I update every time I make a new version of the workbook. In my macro, I want to grab this value. ThisWorkbook.Names("VERSION").Value returns "=UPDATES!$D$16". How should I change that line to return the value which is Cell D16 on my UPDATES tab? -- TIA, Brad E. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Brad
try evaluate(thisworkbook.names("VERSION").value) -- Regards Roger Govier Brad E. wrote: I have a Named Range called VERSION, in which I update every time I make a new version of the workbook. In my macro, I want to grab this value. ThisWorkbook.Names("VERSION").Value returns "=UPDATES!$D$16". How should I change that line to return the value which is Cell D16 on my UPDATES tab? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Roger. I like this better than the "RefersToRange" method. Evaluate
makes sense to me. Brad "Roger Govier" wrote: Hi Brad try evaluate(thisworkbook.names("VERSION").value) -- Regards Roger Govier Brad E. wrote: I have a Named Range called VERSION, in which I update every time I make a new version of the workbook. In my macro, I want to grab this value. ThisWorkbook.Names("VERSION").Value returns "=UPDATES!$D$16". How should I change that line to return the value which is Cell D16 on my UPDATES tab? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting a named range, the name of the named range is in a cell | Excel Programming | |||
Referencing a named range based upon Range name entry in cell | Excel Worksheet Functions | |||
named dynamic range that ends with first text entry | Excel Worksheet Functions | |||
inserting a named range into new cells based on a named cell | Excel Discussion (Misc queries) | |||
If any cell in named range = 8 then shade named range | Excel Programming |