View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mats Samson Mats Samson is offline
external usenet poster
 
Posts: 112
Default Named ranges and variables

Hello everybody,
trying to solve my problem with using variables referring to named ranges
(see the same header as bove from today) I discovered a what I believe is a
fault or maybe I'm overlooking something!
I have a cell named 'myRange' at M20 and want the code to navigate to this
cell and paste information copied elsewhere. If I use myRange.Select
Pastespecial (xlvalues) (the originating cells contains formulas) the pasting
will define the value of the first cell (f.i. 'Monkey') as a Name
referencing to cell M20 (cell M20 contains the pasted value/string 'Monkey'
too). This new Name overrides 'myRange' in the Name-bar even though both
Names (Monkey and myRange) exists, referencing to the same cell.
Who is the monkey, Excel or me?
Best regards
Mats