Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Getting the entry of a Named Range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Getting the entry of a Named Range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Getting the entry of a Named Range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 376
Default Getting the entry of a Named Range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Getting the entry of a Named Range

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting a named range, the name of the named range is in a cell Luc[_8_] Excel Programming 6 January 13th 10 07:35 PM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
named dynamic range that ends with first text entry mcmanusb Excel Worksheet Functions 5 October 12th 06 05:33 AM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM


All times are GMT +1. The time now is 08:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"