+ Reply to Thread
Results 1 to 5 of 5

Set one Range equal to another Range?

  1. #1
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    176

    Set one Range equal to another Range?

    If I set Range1 = Range2 this works. But if later I try to set Range1 = Range3 this doesn't work. Range1 stays equal to Range2.

    Does anybody know how to solve this?

    Thanks:

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    Re: Set one Range equal to another Range?

    In theroy there should not be any issue.

    if you post some code up people can see whats going on, other than that im not sure.

  3. #3
    Registered User
    Join Date
    01-09-2012
    Location
    Savannah GA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Set one Range equal to another Range?

    Quote Originally Posted by danny2000 View Post
    If I set Range1 = Range2 this works. But if later I try to set Range1 = Range3 this doesn't work. Range1 stays equal to Range2.
    If your Range was a single Cell reference it should have worked. If the range includes a multiple cell area you must qualify the range with ".Value" or it will not work. At least with my test in Excel 2003. I was having trouble with the Range = Range until I added .Value to the source range. This will also work to duplicate a range from another worksheet if the source range is qualified with the Workbook and Sheet name.

    Range("B24") = Range("B20") ' This Works
    Range("B24:C24") = Range("B20:C24").Value ' This Works
    Range("B24:C24") = Range("B20:C24") ' This does NOT Work

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2011
    Location
    Mississauga, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    503

    Re: Set one Range equal to another Range?

    the range dimension should be the same:
    Please Login or Register  to view this content.
    Last edited by Kelshaer; 01-10-2012 at 09:22 AM.
    Regards,
    Khaled Elshaer
    www.BIMcentre.com

    Remember To Do the Following....
    1. Thank those who have helped you by clicking the Star below their post.
    2. Mark your post SOLVED if it has been answered satisfactorily:
    • Select Thread Tools (on top of your 1st post)
    • Select Mark this thread as Solved

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Set one Range equal to another Range?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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