+ Reply to Thread
Results 1 to 4 of 4

Copy/Paste Range Reference

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    somewhere
    MS-Off Ver
    Excel 2003
    Posts
    7

    Question Copy/Paste Range Reference

    Hi all,

    I'm trying to copy and paste the reference of a named range to another location.

    Example:

    Named range "teste" = (A1: E4), but is not alwasy fixed more rows may be added.

    1) Copy reference only ("A1:E4") and paste in another location.

    I have tried 2 different methods, but they do not work the way I need them to

    1) It faults on the paste line, it seems there is nothing to be pasted

    Application.Goto Reference:="Teste"
    Range("a7").Select
    ActiveCell.Paste

    2) It does NOT do what I intend it to do. It always copies and pastes a fixed location and in case new rows/columns are added it will not capture it.

    Application.Goto Reference:="ActBra10"
    Windows("Monthly Template -2009 2.xls").Activate
    Sheets("Input (2)").Range("S37").Select
    ActiveCell.FormulaR1C1 = "='Base Calculo'!R1C1:R372C20"

    Appreciate your help in solving this problem.

    Regards

    Alex

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Copy/Paste Range Reference

    Try using

    Please Login or Register  to view this content.
    for your named range, this will allow for extra rows

  3. #3
    Registered User
    Join Date
    01-28-2010
    Location
    somewhere
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy/Paste Range Reference

    Quote Originally Posted by Marcol View Post
    Try using

    Please Login or Register  to view this content.
    for your named range, this will allow for extra rows
    and if I also want to allow extra columns? how would I fit in this code?


    Thanks

  4. #4
    Registered User
    Join Date
    01-28-2010
    Location
    somewhere
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy/Paste Range Reference

    To all that tried to help, I figured it out in another forum, below the solution

    Application.Goto Reference:="Teste"

    Range("A7").Value = Replace(Names("Teste").RefersTo, "=", "")

    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1