+ Reply to Thread
Results 1 to 11 of 11

Macro to Copy Paste Values and Formulas

  1. #1
    Registered User
    Join Date
    10-08-2009
    Location
    Granite Falls, NC
    MS-Off Ver
    Excel 2003
    Posts
    17

    Macro to Copy Paste Values and Formulas

    I have an existing macro that copies a worksheet and pastes it into another workbook, renames it and then attaches it to an email. My problem is that it pastes just the values. I need it to paste part of the original worksheet as values and part copy the formulas. So on the new workbook Columns A through F will be values only and G through Z will copy the formulas. Here is the script that I am working with. Thanks for any help.

    Please Login or Register  to view this content.
    Last edited by thillis; 10-19-2009 at 01:01 PM.

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

    Re: Macro to Copy Paste Values and Formulas

    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

  3. #3
    Registered User
    Join Date
    10-08-2009
    Location
    Granite Falls, NC
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Macro to Copy Paste Values and Formulas

    Sorry Im new here and didnt read the rules.

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

    Re: Macro to Copy Paste Values and Formulas

    Thanks for taking the time to read and comply with the rule .

  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: Macro to Copy Paste Values and Formulas

    This will copy the active sheet to a new workbook & replace formulas in A to F with values
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-08-2009
    Location
    Granite Falls, NC
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Macro to Copy Paste Values and Formulas

    Thanks a lot that did it.

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

    Re: Macro to Copy Paste Values and Formulas

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  8. #8
    Registered User
    Join Date
    10-08-2009
    Location
    Granite Falls, NC
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Macro to Copy Paste Values and Formulas

    Your solution did excatly what I wanted, but it is also changing the formula on the existing worksheet as well. I need for the original worksheet to maintain all formulas and the "new" worksheet to have the combination of formulas and values.

    Thanks for the help. This site is great.

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

    Re: Macro to Copy Paste Values and Formulas

    It shouldn't, but try
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    10-08-2009
    Location
    Granite Falls, NC
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Macro to Copy Paste Values and Formulas

    By Adding the "." before Columns Keeps the original workbook from being changed but I get a Run-Time Error 1004 When it is trying to create the newly named workbook.

  11. #11
    Registered User
    Join Date
    10-08-2009
    Location
    Granite Falls, NC
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Macro to Copy Paste Values and Formulas

    I was able to get it to work with

    Please Login or Register  to view this content.
    Thanks again for all the help and quick responses. This is one of the best forums I have found.

+ 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