+ Reply to Thread
Results 1 to 6 of 6

Copy formulas not values

  1. #1
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Copy formulas not values

    Hi guys,

    There are plenty of google hits for people copy-pasting in VBA but actually wanting 'paste special as values'; my problem is the opposite and I'm totally flummoxed.
    This:
    Please Login or Register  to view this content.
    is meant to filter my raw data table, duplicate a certain set (QXY) and 'rename' them (as QXY revised) so that I can see how adjustments to the data would look without losing the original.

    But sometimes the copy command pastes values (this afternoon, for example) and sometimes formulae. (I definitely need the formulae). I'm probably being a total div, but I can't work out for the life of me what the cause is.

    My last resort is simply to break the copy over two lines and paste special 'all' - but I know this is a weak man's workaround and I'd like to know the cause for the sake of predictability/manageability.

    Any help gratefully received.

    CC

    PS - on further inspection, it would seem the "default paste is as values" is not limited to the VBA - I also lose the formulae if I copy/paste manually. So perhaps my question should be "why is my copy/paste broken?"
    Last edited by Cheeky Charlie; 03-25-2009 at 01:12 PM. Reason: PS

  2. #2
    Registered User
    Join Date
    03-16-2009
    Location
    Your mom's basement
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Copy formulas not values

    if all else fails, you can access the formula for a cell directly with cells("A1").formula or cells(row,col).formula.

  3. #3
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Copy formulas not values

    Anyone else?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Copy formulas not values

    You want to copy the exact formulas, or have adjustments to references?
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Copy formulas not values

    well - relative as per relative references and $fixed where $fixed (if that's what you mean?)

    Normal copy/paste behaviour basically.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Copy formulas not values

    So I'd think what you have should work fine, unless the filter is interfering(?) Post an example.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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