+ Reply to Thread
Results 1 to 5 of 5

Excel VBA is pasting formulas and not values

  1. #1
    Registered User
    Join Date
    04-02-2019
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    74

    Excel VBA is pasting formulas and not values

    This is probably a simple fix but I can't seem to crack it...the code below is pasting formulas rather than values. The copy/paste is near the bottom in the "desWS.Range" statements.

    Please Login or Register  to view this content.
    Last edited by YukonSoDank; 04-09-2019 at 08:53 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,087

    Re: Excel VBA is pasting formulas and not values

    You need to use PasteSpecial Values with the Target Range rather than using Copy with source and destination.

    https://docs.microsoft.com/en-us/off...e.pastespecial
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,087

    Re: Excel VBA is pasting formulas and not values

    And, by the way ...

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  4. #4
    Registered User
    Join Date
    04-02-2019
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    74

    Re: Excel VBA is pasting formulas and not values

    Okay, then I need some help..."Range("B8:M8") would need to paste in Q4:AB4....Range("B45:M45") would need to paste in Q8:AB8 in the sheet referenced prior in the code.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,027

    Re: Excel VBA is pasting formulas and not values

    How about
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. pasting formulas as values with multiple selections
    By esbencito in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2018, 12:14 AM
  2. [SOLVED] RunTime error 438 on adding formulas and pasting them as values.
    By PaulM100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2018, 07:29 AM
  3. Code is pasting formulas instead of values - Please help
    By ByronHopf in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2014, 08:25 PM
  4. [SOLVED] Macro Pasting Values Instead of Formulas
    By bryanmarks in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-07-2014, 10:26 AM
  5. Excel crashing when Pasting Formulas as Values
    By XOR LX in forum Excel General
    Replies: 1
    Last Post: 11-08-2013, 11:48 AM
  6. pasting values instead of formulas
    By fabrecass in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2013, 08:22 AM
  7. Pasting Values with Formulas???
    By mccormij in forum Excel General
    Replies: 2
    Last Post: 04-10-2007, 07:05 AM

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