+ Reply to Thread
Results 1 to 5 of 5

How to "clone" a range of cells

  1. #1
    Registered User
    Join Date
    12-16-2011
    Location
    Mill Valley, California
    MS-Off Ver
    Excel 2011
    Posts
    11

    How to "clone" a range of cells

    Here's something I keep thinking the new versions of Excel will do. I'm on Excel 2007 presently so maybe 2010 or beyond fixes.

    What I want to do is "clone" a range of cells. That is, make replicas of the cells w/ their formulas completely unchanged. Sort of like "copy-->paste special-->"clone". I just thought of one way to do it, which is a little kludgey: use the "move or copy" entire worksheet function to basically clone the entire worksheet tab, then cut and paste the range of cells from the cloned tab to where you need them, then delete the cloned tab. Not awful, I guess.

    Short of a VBA approach, there's no other ways to go?

    Note for anybody else who's looking for a single-cell cloning solution: if you need to copy just a single cell, you can just copy the formula itself out of the formula bar then go to your new cell and paste.

  2. #2
    Registered User
    Join Date
    11-16-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: How to "clone" a range of cells

    If you want a formula to reference the same cells no matter where you put it, use the "$" sign before each row and column reference. For example, =SUM($A$1:$A$50) will remain unchanged no matter where you copy and paste it.

    Alternatively, you could do a find and replace, replace the "=" sign with something else (%,@, anything you don't use in the formulas really), copy and paste, then find and replace again to return them to proper formulas.

  3. #3
    Registered User
    Join Date
    12-16-2011
    Location
    Mill Valley, California
    MS-Off Ver
    Excel 2011
    Posts
    11

    Re: How to "clone" a range of cells

    Don't take this wrong way, but I had to laugh when you tried to enlighten me about the magic power of the $. Still, there may be a beginner reading this ages hence who knows nothing about absolute and relative cell references, so worth mentioning.

    However, the idea is that I need to clone the range with all relative / absolute references intact so that I can then do further derivative work from that newly-cloned range without having to go back and re-set the relative / absolute references to status quo ante.

    I like your second idea! It would be more powerful if I could simply add some nonsensical thing like #@& at the start of every cell in the to-be-copied range when selected (rather than manually adding to individual cells piecemeal). THAT I think could be achieved by a macro. Is that more of a kludge than cloning the worksheet as I describe above? YMMV, I guess.

  4. #4
    Registered User
    Join Date
    11-16-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: How to "clone" a range of cells

    You could certainly do it with a macro, though writing VBA code is not my forte.

    However, why would you need to do individual cells using Find+Replace? Just select the entire range, Find what: "=", Replace with: "#@&", and you're done.

    Edit: Oops, that won't work, didn't think that one through. Yeah, I guess a macro would be appropriate, I'm sure someone around here can easily provide code for such a thing, sorry I can't help ya on that part.
    Last edited by JSallen; 12-11-2012 at 03:44 PM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,962

    Re: How to "clone" a range of cells

    install an add-on called ASAP. it has many powerful tools, 1 of which will aloow you to copy without changing the cell references
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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