View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default Excel Named Range

good point, I forgot my quotes...
Range("Variable_1")

Charles

Andrew Taylor wrote:
Either
val = Worksheets("worksheet 3").Range("rangename").Value
or
val = Names("rangename").RefersToRange.Value

should work.

This assumes Worksheet 3 is in the active workbook. If not
then you need to qualify the above by, for examnple,
val = Workbooks("Workbook1").Names("rangename").RefersTo Range.Value




Sandy wrote:
How can I address via vb the value stored in a named range cell.

example: on worksheet 3 I have a cell named variable 1

I want to retrive the value from that cell without going to it and selecting
it. Is there a way?

Thanks